From b5b15214d448306567280bb4241e2f506461fcf6 Mon Sep 17 00:00:00 2001 From: Vincenzo Innocente Date: Thu, 9 Oct 2014 12:35:08 +0200 Subject: [PATCH] fix postfix --- RecoVertex/AdaptiveVertexFit/src/AdaptiveVertexFitter.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RecoVertex/AdaptiveVertexFit/src/AdaptiveVertexFitter.cc b/RecoVertex/AdaptiveVertexFit/src/AdaptiveVertexFitter.cc index b5f7b0c675fdd..8d3ac06149885 100644 --- a/RecoVertex/AdaptiveVertexFit/src/AdaptiveVertexFitter.cc +++ b/RecoVertex/AdaptiveVertexFit/src/AdaptiveVertexFitter.cc @@ -21,7 +21,7 @@ namespace { void sortTracksByPt(std::vector & cont) { auto s = cont.size(); float pt2[s]; int ind[s]; int i=0; - for (auto const & tk : cont) { ind[i]=i; pt2[++i] = tk.impactPointState().globalMomentum().perp2();} + for (auto const & tk : cont) { ind[i]=i; pt2[i++] = tk.impactPointState().globalMomentum().perp2();} std::sort(ind,ind+s, [&](int i, int j){return pt2[i]>pt2[j];} ); std::vector tmp; tmp.reserve(s); for (auto i=0U; i & cont, const GlobalPoint ref ) { auto s = cont.size(); float d2[s]; int ind[s]; int i=0; - for (auto const & tk : cont) { ind[i]=i; d2[++i] = (tk->linearizedTrack()->track().initialFreeState().position() - ref ).mag2();} + for (auto const & tk : cont) { ind[i]=i; d2[i++] = (tk->linearizedTrack()->track().initialFreeState().position() - ref ).mag2();} std::sort(ind,ind+s, [&](int i, int j){return d2[i] tmp; tmp.reserve(s); for (auto i=0U; i