From c8916f5cd770e30d69cfb931544acccd237294da Mon Sep 17 00:00:00 2001 From: Owen Arnold <owen.arnold@stfc.ac.uk> Date: Tue, 3 Oct 2017 08:54:26 +0100 Subject: [PATCH] refs #20460. Remove stable sort. No reason to preserve position for equal elements. --- Framework/Geometry/src/Instrument.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Framework/Geometry/src/Instrument.cpp b/Framework/Geometry/src/Instrument.cpp index 2202bdc38a7..e9f4cbbe453 100644 --- a/Framework/Geometry/src/Instrument.cpp +++ b/Framework/Geometry/src/Instrument.cpp @@ -742,7 +742,7 @@ void Instrument::markAsDetectorIncomplete(const IDetector *det) { void Instrument::markAsDetectorFinalize() { // Detectors (even when different objects) are NOT allowed to have duplicate // ids. This method establishes the presence of duplicates. - std::stable_sort(m_detectorCache.begin(), m_detectorCache.end(), + std::sort(m_detectorCache.begin(), m_detectorCache.end(), [](const std::tuple<detid_t, IDetector_const_sptr, bool> &a, const std::tuple<detid_t, IDetector_const_sptr, bool> &b) -> bool { return std::get<0>(a) < std::get<0>(b); }); -- GitLab