Skip to content

Commit

Permalink
Add std::vector<...>::reserve in ContiguousInternalMemoryDataFacadeBa…
Browse files Browse the repository at this point in the history
…se::GetOverridesThatStartAt (#7024)
  • Loading branch information
SiarheiFedartsou authored Sep 28, 2024
1 parent 203314b commit 5f67e71
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5f67e71

Please sign in to comment.