diff --git a/CHANGELOG.md b/CHANGELOG.md index ad9e06bf9ad..d59d4c6e84e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ - NodeJS: - CHANGED: Use node-api instead of NAN. [#6452](https://github.com/Project-OSRM/osrm-backend/pull/6452) - Misc: + - CHANGED: Avoid copy of vectors in MakeRoute function. [#6939](https://github.com/Project-OSRM/osrm-backend/pull/6939) - FIXED: Fix bugprone-unused-return-value clang-tidy warning. [#6934](https://github.com/Project-OSRM/osrm-backend/pull/6934) - FIXED: Fix performance-noexcept-move-constructor clang-tidy warning. [#6931](https://github.com/Project-OSRM/osrm-backend/pull/6933) - FIXED: Fix performance-noexcept-swap clang-tidy warning. [#6931](https://github.com/Project-OSRM/osrm-backend/pull/6931) diff --git a/include/engine/api/route_api.hpp b/include/engine/api/route_api.hpp index f833d603cd9..b6907ddcaec 100644 --- a/include/engine/api/route_api.hpp +++ b/include/engine/api/route_api.hpp @@ -340,8 +340,8 @@ class RouteAPI : public BaseAPI unpacked_path_segments, source_traversed_in_reverse, target_traversed_in_reverse); - std::vector legs = legs_info.first; - std::vector leg_geometries = legs_info.second; + std::vector &legs = legs_info.first; + std::vector &leg_geometries = legs_info.second; auto route = guidance::assembleRoute(legs); // Fill legs @@ -716,8 +716,8 @@ class RouteAPI : public BaseAPI unpacked_path_segments, source_traversed_in_reverse, target_traversed_in_reverse); - std::vector legs = legs_info.first; - std::vector leg_geometries = legs_info.second; + std::vector &legs = legs_info.first; + std::vector &leg_geometries = legs_info.second; auto route = guidance::assembleRoute(legs); boost::optional json_overview =