From 47e7b11b250413ca6c290d48ada3b519483d7727 Mon Sep 17 00:00:00 2001 From: Carlo Varni <75478407+CarloVarni@users.noreply.github.com> Date: Tue, 9 Apr 2024 15:33:57 +0200 Subject: [PATCH] Reserve and move --- Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp b/Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp index 47e27fd9893..d346b2e4466 100644 --- a/Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp +++ b/Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp @@ -1190,6 +1190,7 @@ class CombinatorialKalmanFilter { } std::vector tracks; + tracks.reserve(combKalmanResult.lastMeasurementIndices.size()); for (auto tip : combKalmanResult.lastMeasurementIndices) { auto track = trackContainer.makeTrack(); @@ -1209,7 +1210,7 @@ class CombinatorialKalmanFilter { calculateTrackQuantities(track); - tracks.push_back(track); + tracks.push_back(std::move(track)); } return tracks;