From 2ce8fe76884a445cb75c11cd9ccce3374d98023b Mon Sep 17 00:00:00 2001 From: Edward Brown <edward.brown@stfc.ac.uk> Date: Tue, 27 Mar 2018 08:32:11 +0100 Subject: [PATCH] Re #22183: Fixed more type conversions on windows. --- Framework/Algorithms/src/DiffractionFocussing.cpp | 2 +- Framework/DataObjects/test/MDBoxFlatTreeTest.h | 4 ++-- Framework/DataObjects/test/MDGridBoxTest.h | 7 +++---- .../mantid/dataobjects/src/Exports/Workspace2D.cpp | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Framework/Algorithms/src/DiffractionFocussing.cpp b/Framework/Algorithms/src/DiffractionFocussing.cpp index 8716e88b605..354ba051a11 100644 --- a/Framework/Algorithms/src/DiffractionFocussing.cpp +++ b/Framework/Algorithms/src/DiffractionFocussing.cpp @@ -83,7 +83,7 @@ void DiffractionFocussing::exec() { if (iprogress_step == 0) iprogress_step = 1; std::vector<int64_t> resultIndeces; - for (long groupNumber : groupNumbers) { + for (auto groupNumber : groupNumbers) { if (iprogress++ % iprogress_step == 0) { progress(0.68 + double(iprogress) / iprogress_count / 3); } diff --git a/Framework/DataObjects/test/MDBoxFlatTreeTest.h b/Framework/DataObjects/test/MDBoxFlatTreeTest.h index 8dbdd1fecb2..3fcd866ec46 100644 --- a/Framework/DataObjects/test/MDBoxFlatTreeTest.h +++ b/Framework/DataObjects/test/MDBoxFlatTreeTest.h @@ -93,8 +93,8 @@ public: if (!Boxes[i]->isBox()) gridIndices.push_back(i); } - for (unsigned long gridIndice : gridIndices) { - delete Boxes[gridIndice]; + for (auto gridIndex : gridIndices) { + delete Boxes[gridIndex]; } // Clean up file diff --git a/Framework/DataObjects/test/MDGridBoxTest.h b/Framework/DataObjects/test/MDGridBoxTest.h index efa720f40f9..ff4538f21b2 100644 --- a/Framework/DataObjects/test/MDGridBoxTest.h +++ b/Framework/DataObjects/test/MDGridBoxTest.h @@ -295,11 +295,10 @@ public: TS_ASSERT_EQUALS(g->getChild(i - 2)->getParent(), g); } // MDGridBox will delete the children that it pulled in but the rest need to - // be - // taken care of manually + // be taken care of manually size_t indices[5] = {0, 1, 12, 13, 14}; - for (unsigned long indice : indices) - delete boxes[indice]; + for (auto index : indices) + delete boxes[index]; delete g; delete bcc; } diff --git a/Framework/PythonInterface/mantid/dataobjects/src/Exports/Workspace2D.cpp b/Framework/PythonInterface/mantid/dataobjects/src/Exports/Workspace2D.cpp index f19bdbe5279..7987881b15b 100644 --- a/Framework/PythonInterface/mantid/dataobjects/src/Exports/Workspace2D.cpp +++ b/Framework/PythonInterface/mantid/dataobjects/src/Exports/Workspace2D.cpp @@ -133,7 +133,7 @@ public: ws.setBinEdges(i, std::move(binEdgeData)); SpectrumDefinition specDef; - for (unsigned long detectorIndex : detectorIndices) { + for (auto detectorIndex : detectorIndices) { specDef.add(detectorIndex); } spectrumDefinitions.emplace_back(std::move(specDef)); -- GitLab