From 5f67e715afd6aaeb90701831bc3d893cdd984968 Mon Sep 17 00:00:00 2001 From: Siarhei Fedartsou Date: Sat, 28 Sep 2024 20:33:33 +0200 Subject: [PATCH] Add std::vector<...>::reserve in ContiguousInternalMemoryDataFacadeBase::GetOverridesThatStartAt (#7024) --- include/engine/datafacade/contiguous_internalmem_datafacade.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/engine/datafacade/contiguous_internalmem_datafacade.hpp b/include/engine/datafacade/contiguous_internalmem_datafacade.hpp index 466c566942..07e74c001a 100644 --- a/include/engine/datafacade/contiguous_internalmem_datafacade.hpp +++ b/include/engine/datafacade/contiguous_internalmem_datafacade.hpp @@ -603,6 +603,8 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade auto found_range = std::equal_range( m_maneuver_overrides.begin(), m_maneuver_overrides.end(), edge_based_node_id, Comp{}); + results.reserve(std::distance(found_range.first, found_range.second)); + std::for_each(found_range.first, found_range.second, [&](const auto &override)