Skip to content

Commit

Permalink
Merge pull request #46082 from iarspider/patch-10
Browse files Browse the repository at this point in the history
Fix warning in MeasurementDet.h
  • Loading branch information
cmsbuild authored Sep 22, 2024
2 parents bbec6fb + fce3d00 commit fa7970a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion TrackingTools/MeasurementDet/interface/MeasurementDet.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,13 @@ class MeasurementDet {
measurements(stateOnThisDet, est, data, tmps);
std::vector<TrajectoryMeasurement> result;
result.reserve(tmps.size());
int index[tmps.size()];
int* index = new int[tmps.size()];
tmps.sortIndex(index);
for (std::size_t i = 0; i != tmps.size(); ++i) {
auto j = index[i];
result.emplace_back(stateOnThisDet, std::move(tmps.hits[j]), tmps.distances[j]);
}
delete[] index;
return result;
}

Expand Down

0 comments on commit fa7970a

Please sign in to comment.