From 73b2a86a95babb5c58600ee5609fc0818c619c78 Mon Sep 17 00:00:00 2001 From: Siarhei Fedartsou Date: Sat, 3 Dec 2022 17:53:56 +0100 Subject: [PATCH] Move vector in CSVFilesParser instead copying it (#6470) --- CHANGELOG.md | 1 + include/updater/csv_file_parser.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0b54e50c..98a871bf4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - NodeJS: - CHANGED: Use node-api instead of NAN. [#6452](https://github.com/Project-OSRM/osrm-backend/pull/6452) - Misc: + - CHANGED: Move vector in CSVFilesParser instead copying it. [#6470](https://github.com/Project-OSRM/osrm-backend/pull/6470) - REMOVED: Get rid of unused functions in util/json_util.hpp. [#6446](https://github.com/Project-OSRM/osrm-backend/pull/6446) - FIXED: Apply workaround for Conan installation issue on CI. [#6442](https://github.com/Project-OSRM/osrm-backend/pull/6442) - FIXED: Fix `npm audit` warnings in NPM package. [#6437](https://github.com/Project-OSRM/osrm-backend/pull/6437) diff --git a/include/updater/csv_file_parser.hpp b/include/updater/csv_file_parser.hpp index c9841798e..92c3dcabb 100644 --- a/include/updater/csv_file_parser.hpp +++ b/include/updater/csv_file_parser.hpp @@ -78,7 +78,7 @@ template struct CSVFilesParser util::Log() << "In total loaded " << csv_filenames.size() << " file(s) with a total of " << lookup.size() << " unique values"; - return LookupTable{lookup}; + return LookupTable{std::move(lookup)}; } catch (const std::exception &e) // TBB should capture to std::exception_ptr and automatically rethrow in this thread.