From 1c3b60e05065e6bf52ce413bfa081a767054cffc Mon Sep 17 00:00:00 2001 From: Edward Brown <edward.brown@stfc.ac.uk> Date: Fri, 23 Mar 2018 09:32:39 +0000 Subject: [PATCH] Re #22183: Applied clang-format patch. --- Framework/API/test/ExperimentInfoTest.h | 2 +- Framework/API/test/GroupingLoaderTest.h | 2 +- .../API/test/MatrixWorkspaceMDIteratorTest.h | 2 +- Framework/Algorithms/src/ConjoinXRuns.cpp | 2 +- .../Algorithms/test/ChangeTimeZeroTest.h | 4 +-- Framework/Algorithms/test/FilterEventsTest.h | 22 ++++++++-------- .../Algorithms/test/GroupWorkspacesTest.h | 4 +-- .../Algorithms/test/RemoveBackgroundTest.h | 2 +- Framework/Algorithms/test/SassenaFFTTest.h | 4 +-- .../Algorithms/test/UnGroupWorkspaceTest.h | 4 +-- Framework/Crystal/src/SCDCalibratePanels.cpp | 4 +-- .../test/ConnectedComponentLabelingTest.h | 2 +- Framework/Crystal/test/PredictPeaksTest.h | 2 +- .../src/Algorithms/EstimateFitParameters.cpp | 2 +- .../FuncMinimizers/TrustRegionMinimizer.cpp | 2 +- .../test/Algorithms/LeBailFunctionTest.h | 2 +- .../test/Algorithms/PlotPeakByLogValueTest.h | 2 +- .../RefinePowderInstrumentParametersTest.h | 2 +- .../test/Functions/ProcessBackgroundTest.h | 2 +- .../IPeakFunctionCentreParameterNameTest.h | 2 +- .../test/IPeakFunctionIntensityTest.h | 6 ++--- Framework/DataHandling/src/LoadMask.cpp | 9 +++---- .../DataHandling/src/LoadSpiceXML2DDet.cpp | 8 +++--- Framework/DataHandling/src/SaveGSS.cpp | 2 +- .../DataHandling/test/FindDetectorsParTest.h | 8 +++--- Framework/DataHandling/test/LoadCalFileTest.h | 2 +- .../DataHandling/test/LoadEventNexusTest.h | 2 +- .../test/LoadEventPreNexus2Test.h | 2 +- .../DataHandling/test/LoadNexusMonitorsTest.h | 4 +-- Framework/DataHandling/test/LoadTest.h | 4 +-- Framework/DataHandling/test/SaveAscii2Test.h | 12 ++++----- Framework/DataHandling/test/SavePHXTest.h | 2 +- Framework/DataObjects/src/Workspace2D.cpp | 4 +-- Framework/DataObjects/test/EventListTest.h | 8 +++--- Framework/DataObjects/test/MDBoxTest.h | 6 ++--- Framework/DataObjects/test/MDGridBoxTest.h | 26 +++++++++---------- .../test/MDHistoWorkspaceIteratorTest.h | 12 ++++----- .../src/Rendering/vtkGeometryCacheReader.cpp | 4 +-- Framework/Geometry/test/CSGObjectTest.h | 6 ++--- Framework/Geometry/test/CenteringGroupTest.h | 5 ++-- .../test/CompositeBraggScattererTest.h | 2 +- .../Geometry/test/GroupTransformationTest.h | 2 +- Framework/Geometry/test/IndexingUtilsTest.h | 8 +++--- Framework/Geometry/test/PointGroupTest.h | 4 +-- .../Geometry/test/ReflectionConditionTest.h | 2 +- Framework/Geometry/test/SpaceGroupTest.h | 4 +-- .../test/SymmetryOperationFactoryTest.h | 4 +-- Framework/Kernel/test/ConfigServiceTest.h | 2 +- .../Kernel/test/DiskBufferISaveableTest.h | 18 ++++++------- Framework/Kernel/test/DiskBufferTest.h | 12 ++++----- Framework/Kernel/test/FileDescriptorTest.h | 2 +- Framework/Kernel/test/GlobTest.h | 4 +-- Framework/Kernel/test/MutexTest.h | 2 +- Framework/Kernel/test/NexusDescriptorTest.h | 2 +- Framework/Kernel/test/PropertyWithValueTest.h | 2 +- Framework/Kernel/test/SobolSequenceTest.h | 2 +- Framework/Kernel/test/ThreadSchedulerTest.h | 2 +- Framework/Kernel/test/UsageServiceTest.h | 2 +- Framework/MDAlgorithms/test/LoadMDTest.h | 2 +- Framework/MDAlgorithms/test/MDTransfQ3DTest.h | 2 +- .../MDAlgorithms/test/MergeMDFilesTest.h | 2 +- Framework/MDAlgorithms/test/ReplicateMDTest.h | 2 +- .../MDAlgorithms/test/TobyFitYVectorTest.h | 2 +- .../dataobjects/src/Exports/Workspace2D.cpp | 2 +- .../test/AbortRemoteJob2Test.h | 2 +- .../test/AbortRemoteJobTest.h | 2 +- .../RemoteAlgorithms/test/Authenticate2Test.h | 2 +- .../RemoteAlgorithms/test/AuthenticateTest.h | 2 +- .../test/DownloadRemoteFile2Test.h | 2 +- .../test/DownloadRemoteFileTest.h | 2 +- Framework/RemoteAlgorithms/test/Logout2Test.h | 2 +- .../test/QueryAllRemoteJobs2Test.h | 2 +- .../test/QueryAllRemoteJobsTest.h | 2 +- .../test/QueryRemoteFile2Test.h | 2 +- .../test/QueryRemoteFileTest.h | 2 +- .../test/QueryRemoteJob2Test.h | 2 +- .../test/QueryRemoteJobTest.h | 2 +- .../test/StartRemoteTransaction2Test.h | 2 +- .../test/StartRemoteTransactionTest.h | 2 +- .../test/StopRemoteTransaction2Test.h | 2 +- .../test/StopRemoteTransactionTest.h | 2 +- .../test/SubmitRemoteJob2Test.h | 2 +- .../test/SubmitRemoteJobTest.h | 2 +- .../test/UploadRemoteFile2Test.h | 2 +- .../test/UploadRemoteFileTest.h | 2 +- Framework/SINQ/test/PoldiFitPeaks1D2Test.h | 2 +- Framework/SINQ/test/PoldiFitPeaks1DTest.h | 2 +- .../SINQ/test/PoldiIndexKnownCompoundsTest.h | 4 +-- Framework/SINQ/test/PoldiPeakSearchTest.h | 2 +- .../test/ScriptRepositoryTestImpl.h | 4 +-- 90 files changed, 173 insertions(+), 173 deletions(-) diff --git a/Framework/API/test/ExperimentInfoTest.h b/Framework/API/test/ExperimentInfoTest.h index 447b8652517..71806ba8cc0 100644 --- a/Framework/API/test/ExperimentInfoTest.h +++ b/Framework/API/test/ExperimentInfoTest.h @@ -526,7 +526,7 @@ public: std::pair<std::unordered_multimap<std::string, fromToEntry>::iterator, std::unordered_multimap<std::string, fromToEntry>::iterator> ret; - for (const auto & idfIdentifier : idfIdentifiers) { + for (const auto &idfIdentifier : idfIdentifiers) { ret = idfFiles.equal_range(idfIdentifier); for (it1 = ret.first; it1 != ret.second; ++it1) { for (it2 = ret.first; it2 != ret.second; ++it2) { diff --git a/Framework/API/test/GroupingLoaderTest.h b/Framework/API/test/GroupingLoaderTest.h index 9d610c10fa3..4258fb1cbf2 100644 --- a/Framework/API/test/GroupingLoaderTest.h +++ b/Framework/API/test/GroupingLoaderTest.h @@ -25,7 +25,7 @@ public: auto dataPaths = ConfigService::Instance().getDataSearchDirs(); // Find the path of AutoTestData - for (auto & dataPath : dataPaths) { + for (auto &dataPath : dataPaths) { Poco::Path path(dataPath); if (path.directory(path.depth() - 1) == "UnitTest") { diff --git a/Framework/API/test/MatrixWorkspaceMDIteratorTest.h b/Framework/API/test/MatrixWorkspaceMDIteratorTest.h index c1c61f2574a..53e79184e72 100644 --- a/Framework/API/test/MatrixWorkspaceMDIteratorTest.h +++ b/Framework/API/test/MatrixWorkspaceMDIteratorTest.h @@ -92,7 +92,7 @@ public: // The number of output cannot be larger than the number of histograms std::vector<IMDIterator *> it = ws->createIterators(10, nullptr); TS_ASSERT_EQUALS(it.size(), 4); - for (auto & i : it) + for (auto &i : it) delete i; // Split in 4 iterators diff --git a/Framework/Algorithms/src/ConjoinXRuns.cpp b/Framework/Algorithms/src/ConjoinXRuns.cpp index 9a92ef65657..fa9504834ad 100644 --- a/Framework/Algorithms/src/ConjoinXRuns.cpp +++ b/Framework/Algorithms/src/ConjoinXRuns.cpp @@ -254,7 +254,7 @@ void ConjoinXRuns::fillHistory() { if (!isChild()) { // Loop over the input workspaces, making the call that copies their // history to the output one - for (auto & inWS : m_inputWS) { + for (auto &inWS : m_inputWS) { m_outWS->history().addHistory(inWS->getHistory()); } // Add the history for the current algorithm to the output diff --git a/Framework/Algorithms/test/ChangeTimeZeroTest.h b/Framework/Algorithms/test/ChangeTimeZeroTest.h index 38975edc701..c0dd81f2f1d 100644 --- a/Framework/Algorithms/test/ChangeTimeZeroTest.h +++ b/Framework/Algorithms/test/ChangeTimeZeroTest.h @@ -487,7 +487,7 @@ private: auto logs = ws->run().getLogData(); // Go over each log and check the times - for (auto & log : logs) { + for (auto &log : logs) { if (dynamic_cast<Mantid::Kernel::ITimeSeriesProperty *>(log)) { do_check_time_series(log, timeShift); } else if (dynamic_cast<PropertyWithValue<std::string> *>(log)) { @@ -509,7 +509,7 @@ private: // Iterator over all entries of the time series and check if they are // altered double secondCounter = timeShift; - for (auto & time : times) { + for (auto &time : times) { double secs = DateAndTime::secondsFromDuration(time - m_startTime); TSM_ASSERT_DELTA("Time series logs should have shifted times.", secs, secondCounter, 1e-5); diff --git a/Framework/Algorithms/test/FilterEventsTest.h b/Framework/Algorithms/test/FilterEventsTest.h index 28a78ced563..ab7e5f64107 100644 --- a/Framework/Algorithms/test/FilterEventsTest.h +++ b/Framework/Algorithms/test/FilterEventsTest.h @@ -254,7 +254,7 @@ public: AnalysisDataService::Instance().remove("Splitter02"); std::vector<std::string> outputwsnames = filter.getProperty("OutputWorkspaceNames"); - for (const auto & outputwsname : outputwsnames) { + for (const auto &outputwsname : outputwsnames) { AnalysisDataService::Instance().remove(outputwsname); } @@ -350,7 +350,7 @@ public: AnalysisDataService::Instance().remove("Splitter02"); std::vector<std::string> outputwsnames = filter.getProperty("OutputWorkspaceNames"); - for (const auto & outputwsname : outputwsnames) { + for (const auto &outputwsname : outputwsnames) { std::cout << "Delete output workspace name: " << outputwsname << "\n"; AnalysisDataService::Instance().remove(outputwsname); } @@ -435,7 +435,7 @@ public: std::vector<std::string> outputwsnames = filter.getProperty("OutputWorkspaceNames"); - for (const auto & outputwsname : outputwsnames) { + for (const auto &outputwsname : outputwsnames) { AnalysisDataService::Instance().remove(outputwsname); } @@ -493,7 +493,7 @@ public: // Delete all the workspaces generated here AnalysisDataService::Instance().remove("MockDirectEventWS"); AnalysisDataService::Instance().remove("SplitterTableX"); - for (const auto & i : vecwsname) { + for (const auto &i : vecwsname) { AnalysisDataService::Instance().remove(i); } @@ -544,7 +544,7 @@ public: AnalysisDataService::Instance().remove("SplitterTableX"); std::vector<std::string> outputwsnames = filter.getProperty("OutputWorkspaceNames"); - for (const auto & outputwsname : outputwsnames) { + for (const auto &outputwsname : outputwsnames) { AnalysisDataService::Instance().remove(outputwsname); } @@ -608,7 +608,7 @@ public: AnalysisDataService::Instance().remove("MockIndirectEventWS"); std::vector<std::string> outputwsnames = filter.getProperty("OutputWorkspaceNames"); - for (const auto & outputwsname : outputwsnames) { + for (const auto &outputwsname : outputwsnames) { AnalysisDataService::Instance().remove(outputwsname); } @@ -781,7 +781,7 @@ public: // Test the sample logs std::vector<std::string> outputwsnames = filter.getProperty("OutputWorkspaceNames"); - for (const auto & outputwsname : outputwsnames) { + for (const auto &outputwsname : outputwsnames) { EventWorkspace_sptr filtered_ws = boost::dynamic_pointer_cast<DataObjects::EventWorkspace>( AnalysisDataService::Instance().retrieve(outputwsname)); @@ -805,7 +805,7 @@ public: // clean up all the workspaces generated AnalysisDataService::Instance().remove("Test10"); AnalysisDataService::Instance().remove("Splitter10"); - for (const auto & outputwsname : outputwsnames) { + for (const auto &outputwsname : outputwsnames) { AnalysisDataService::Instance().remove(outputwsname); } @@ -977,7 +977,7 @@ public: AnalysisDataService::Instance().remove("TableSplitter1"); std::vector<std::string> outputwsnames = filter.getProperty("OutputWorkspaceNames"); - for (const auto & outputwsname : outputwsnames) { + for (const auto &outputwsname : outputwsnames) { AnalysisDataService::Instance().remove(outputwsname); } @@ -1033,7 +1033,7 @@ public: std::vector<std::string> outputwsnames = filter.getProperty("OutputWorkspaceNames"); - for (const auto & outputwsname : outputwsnames) { + for (const auto &outputwsname : outputwsnames) { EventWorkspace_sptr childworkspace = boost::dynamic_pointer_cast<EventWorkspace>( AnalysisDataService::Instance().retrieve(outputwsname)); @@ -1051,7 +1051,7 @@ public: // clean workspaces AnalysisDataService::Instance().remove("Test12"); AnalysisDataService::Instance().remove("TableSplitter2"); - for (const auto & outputwsname : outputwsnames) { + for (const auto &outputwsname : outputwsnames) { AnalysisDataService::Instance().remove(outputwsname); } diff --git a/Framework/Algorithms/test/GroupWorkspacesTest.h b/Framework/Algorithms/test/GroupWorkspacesTest.h index b9f4c2abec1..bc183339d67 100644 --- a/Framework/Algorithms/test/GroupWorkspacesTest.h +++ b/Framework/Algorithms/test/GroupWorkspacesTest.h @@ -196,7 +196,7 @@ public: private: void addTestMatrixWorkspacesToADS(const std::vector<std::string> &inputs) { - for (const auto & input : inputs) { + for (const auto &input : inputs) { addTestMatrixWorkspaceToADS(input); } } @@ -258,7 +258,7 @@ private: const std::vector<std::string> &members) { auto &ads = Mantid::API::AnalysisDataService::Instance(); - for (const auto & member : members) { + for (const auto &member : members) { if (ads.doesExist(member)) ads.remove(member); } diff --git a/Framework/Algorithms/test/RemoveBackgroundTest.h b/Framework/Algorithms/test/RemoveBackgroundTest.h index 93cea273688..8139f055e6f 100644 --- a/Framework/Algorithms/test/RemoveBackgroundTest.h +++ b/Framework/Algorithms/test/RemoveBackgroundTest.h @@ -195,7 +195,7 @@ public: auto clone = cloneSourceWS(); // set negative values to signal auto &Y = clone->dataY(0); - for (double & i : Y) { + for (double &i : Y) { i = -1000; } // Create zero background workspace diff --git a/Framework/Algorithms/test/SassenaFFTTest.h b/Framework/Algorithms/test/SassenaFFTTest.h index 5f5f5c4032b..39f6472feb0 100644 --- a/Framework/Algorithms/test/SassenaFFTTest.h +++ b/Framework/Algorithms/test/SassenaFFTTest.h @@ -144,7 +144,7 @@ private: double sum = 0.0; double average = 0.0; MantidVec::iterator itx = xv.begin(); - for (double & it : yv) { + for (double &it : yv) { factor = exp(exponentFactor * (*itx)); sum += it * factor; average += it * (*itx) * factor; @@ -186,7 +186,7 @@ private: xv = ws->readX(i); MantidVec::iterator itx = xv.begin(); double sum = 0.0; - for (double & it : yv) { + for (double &it : yv) { factor = exp(exponentFactor * (*itx)); sum += it * factor; ++itx; diff --git a/Framework/Algorithms/test/UnGroupWorkspaceTest.h b/Framework/Algorithms/test/UnGroupWorkspaceTest.h index 75515d1f21c..62e6379b4d4 100644 --- a/Framework/Algorithms/test/UnGroupWorkspaceTest.h +++ b/Framework/Algorithms/test/UnGroupWorkspaceTest.h @@ -102,7 +102,7 @@ private: auto newGroup = boost::make_shared<Mantid::API::WorkspaceGroup>(); auto &ads = Mantid::API::AnalysisDataService::Instance(); - for (const auto & input : inputs) { + for (const auto &input : inputs) { auto ws = addTestMatrixWorkspaceToADS(input); newGroup->addWorkspace(ws); } @@ -120,7 +120,7 @@ private: void removeFromADS(const std::vector<std::string> &members) { auto &ads = Mantid::API::AnalysisDataService::Instance(); - for (const auto & member : members) { + for (const auto &member : members) { if (ads.doesExist(member)) ads.remove(member); } diff --git a/Framework/Crystal/src/SCDCalibratePanels.cpp b/Framework/Crystal/src/SCDCalibratePanels.cpp index f8be052c74e..be3bd66cf02 100644 --- a/Framework/Crystal/src/SCDCalibratePanels.cpp +++ b/Framework/Crystal/src/SCDCalibratePanels.cpp @@ -102,7 +102,7 @@ void SCDCalibratePanels::exec() { std::vector<std::string> parameter_workspaces( MyBankNames.size() + MyPanels.size(), "params_"); int i = 0; - for (auto & MyPanel : MyPanels) { + for (auto &MyPanel : MyPanels) { fit_workspaces[i] += MyPanel; parameter_workspaces[i] += MyPanel; i++; @@ -122,7 +122,7 @@ void SCDCalibratePanels::exec() { << " degrees\n"; } - for (auto & MyBankName : MyBankNames) { + for (auto &MyBankName : MyBankNames) { fit_workspaces[i] += MyBankName; parameter_workspaces[i] += MyBankName; i++; diff --git a/Framework/Crystal/test/ConnectedComponentLabelingTest.h b/Framework/Crystal/test/ConnectedComponentLabelingTest.h index 8e976b9f2be..4b82f4201a7 100644 --- a/Framework/Crystal/test/ConnectedComponentLabelingTest.h +++ b/Framework/Crystal/test/ConnectedComponentLabelingTest.h @@ -410,7 +410,7 @@ public: clusterThreeIndexes.end()); // Add elevated signal to the workspace at cluster indexes. - for (unsigned long & allClusterIndexe : allClusterIndexes) { + for (unsigned long &allClusterIndexe : allClusterIndexes) { inWS->setSignalAt(allClusterIndexe, raisedSignal); } diff --git a/Framework/Crystal/test/PredictPeaksTest.h b/Framework/Crystal/test/PredictPeaksTest.h index 4e36e48f695..6778889cdc0 100644 --- a/Framework/Crystal/test/PredictPeaksTest.h +++ b/Framework/Crystal/test/PredictPeaksTest.h @@ -37,7 +37,7 @@ public: PeaksWorkspace_sptr hklPW; if (hkls.size() > 0) { hklPW = PeaksWorkspace_sptr(new PeaksWorkspace()); - for (const auto & hkl : hkls) { + for (const auto &hkl : hkls) { Peak p(inst, detid, 1.0); p.setHKL(hkl); hklPW->addPeak(p); diff --git a/Framework/CurveFitting/src/Algorithms/EstimateFitParameters.cpp b/Framework/CurveFitting/src/Algorithms/EstimateFitParameters.cpp index 17ab19c42d5..aa33da34928 100644 --- a/Framework/CurveFitting/src/Algorithms/EstimateFitParameters.cpp +++ b/Framework/CurveFitting/src/Algorithms/EstimateFitParameters.cpp @@ -429,7 +429,7 @@ void EstimateFitParameters::execConcrete() { if (m_function->isActive(i)) { TableRow row = table->appendRow(); row << m_function->parameterName(i); - for (auto & j : output) { + for (auto &j : output) { row << j[ia]; } ++ia; diff --git a/Framework/CurveFitting/src/FuncMinimizers/TrustRegionMinimizer.cpp b/Framework/CurveFitting/src/FuncMinimizers/TrustRegionMinimizer.cpp index 9386efa3c2d..8c62a15cb8b 100644 --- a/Framework/CurveFitting/src/FuncMinimizers/TrustRegionMinimizer.cpp +++ b/Framework/CurveFitting/src/FuncMinimizers/TrustRegionMinimizer.cpp @@ -1274,7 +1274,7 @@ void solveSubproblem(int n, double radius, double f, inform.obj *= pow(scale_c, 2) / scale_h; inform.multiplier *= scale_h; inform.pole *= scale_h; - for (auto & i : inform.history) { // do i = 1, inform.len_history + for (auto &i : inform.history) { // do i = 1, inform.len_history i.lambda *= scale_h; i.x_norm *= scale_c / scale_h; } diff --git a/Framework/CurveFitting/test/Algorithms/LeBailFunctionTest.h b/Framework/CurveFitting/test/Algorithms/LeBailFunctionTest.h index d072227eb6c..0aa3b2c2fbe 100644 --- a/Framework/CurveFitting/test/Algorithms/LeBailFunctionTest.h +++ b/Framework/CurveFitting/test/Algorithms/LeBailFunctionTest.h @@ -687,7 +687,7 @@ public: vecy.push_back(0.03096179); vece.push_back(0.00105191); - for (double & i : vecy) + for (double &i : vecy) i -= 0.02295189; return; diff --git a/Framework/CurveFitting/test/Algorithms/PlotPeakByLogValueTest.h b/Framework/CurveFitting/test/Algorithms/PlotPeakByLogValueTest.h index 8ba433096f7..887b222e9af 100644 --- a/Framework/CurveFitting/test/Algorithms/PlotPeakByLogValueTest.h +++ b/Framework/CurveFitting/test/Algorithms/PlotPeakByLogValueTest.h @@ -496,7 +496,7 @@ public: TS_ASSERT(fits->getNames().size() == 2); auto wsNames = fits->getNames(); - for (const auto & wsName : wsNames) { + for (const auto &wsName : wsNames) { auto fit = AnalysisDataService::Instance().retrieveWS<const MatrixWorkspace>( wsName); diff --git a/Framework/CurveFitting/test/Algorithms/RefinePowderInstrumentParametersTest.h b/Framework/CurveFitting/test/Algorithms/RefinePowderInstrumentParametersTest.h index b6b7d4a40fe..ba013ee91cb 100644 --- a/Framework/CurveFitting/test/Algorithms/RefinePowderInstrumentParametersTest.h +++ b/Framework/CurveFitting/test/Algorithms/RefinePowderInstrumentParametersTest.h @@ -416,7 +416,7 @@ public: // 2. Add peak parameters' name and values map<string, vector<double>>::iterator finditer; - for (const auto & paramname : paramnames) { + for (const auto ¶mname : paramnames) { API::TableRow newrow = geomws->appendRow(); std::string parname = paramname; double parvalue = parameters[paramname]; diff --git a/Framework/CurveFitting/test/Functions/ProcessBackgroundTest.h b/Framework/CurveFitting/test/Functions/ProcessBackgroundTest.h index c1dfa668cb2..13ca05b896b 100644 --- a/Framework/CurveFitting/test/Functions/ProcessBackgroundTest.h +++ b/Framework/CurveFitting/test/Functions/ProcessBackgroundTest.h @@ -446,7 +446,7 @@ public: MersenneTwister mt(1234, 0.0, 1000000.0); std::vector<double> bkgdpts(10000); - for (double & bkgdpt : bkgdpts) { + for (double &bkgdpt : bkgdpts) { bkgdpt = mt.nextValue(); } diff --git a/Framework/CurveFitting/test/IPeakFunctionCentreParameterNameTest.h b/Framework/CurveFitting/test/IPeakFunctionCentreParameterNameTest.h index 5922aa4ede3..843542f9221 100644 --- a/Framework/CurveFitting/test/IPeakFunctionCentreParameterNameTest.h +++ b/Framework/CurveFitting/test/IPeakFunctionCentreParameterNameTest.h @@ -33,7 +33,7 @@ public: /* Test that all functions give the expected result. */ void testAllFunctions() { - for (auto & expectedResult : m_expectedResults) { + for (auto &expectedResult : m_expectedResults) { const std::string &peakFunctionName = expectedResult.first; const std::string ¢reParameterName = expectedResult.second; diff --git a/Framework/CurveFitting/test/IPeakFunctionIntensityTest.h b/Framework/CurveFitting/test/IPeakFunctionIntensityTest.h index e2483577cd3..7babcbecbfa 100644 --- a/Framework/CurveFitting/test/IPeakFunctionIntensityTest.h +++ b/Framework/CurveFitting/test/IPeakFunctionIntensityTest.h @@ -91,7 +91,7 @@ private: std::vector<std::string> registeredFunctions = FunctionFactory::Instance().getFunctionNames<IPeakFunction>(); - for (auto & registeredFunction : registeredFunctions) { + for (auto ®isteredFunction : registeredFunctions) { if (blackList.count(registeredFunction) == 0) { IPeakFunction_sptr peakFunction = boost::dynamic_pointer_cast<IPeakFunction>( @@ -109,7 +109,7 @@ private: void initializePeakFunctions(const std::vector<IPeakFunction_sptr> &peaks, const ParameterSet ¶meters) const { - for (const auto & peak : peaks) { + for (const auto &peak : peaks) { peak->setCentre(parameters.center); // for Ikeda-Carpenter it's not allowed to set Fwhm @@ -136,7 +136,7 @@ private: getIntensities(const std::vector<IPeakFunction_sptr> &peaks) const { std::vector<double> intensities; - for (const auto & peak : peaks) { + for (const auto &peak : peaks) { intensities.push_back(peak->intensity()); } diff --git a/Framework/DataHandling/src/LoadMask.cpp b/Framework/DataHandling/src/LoadMask.cpp index 633cbbbca75..10661889d02 100644 --- a/Framework/DataHandling/src/LoadMask.cpp +++ b/Framework/DataHandling/src/LoadMask.cpp @@ -701,7 +701,7 @@ void LoadMask::convertSpMasksToDetIDs(const API::MatrixWorkspace &sourceWS, sourceWS.getDetectorIDToWorkspaceIndexMap(false); std::multimap<size_t, Mantid::detid_t> spectr2index_map; - for (auto & it : sourceDetMap) { + for (auto &it : sourceDetMap) { spectr2index_map.insert( std::pair<size_t, Mantid::detid_t>(it.second, it.first)); } @@ -710,10 +710,9 @@ void LoadMask::convertSpMasksToDetIDs(const API::MatrixWorkspace &sourceWS, // find spectra number from spectra ID for the source workspace const auto itSpec = s2imap.find(i); if (itSpec == s2imap.end()) { - throw std::runtime_error( - "Can not find spectra with ID: " + - boost::lexical_cast<std::string>(i) + - " in the workspace" + sourceWS.getName()); + throw std::runtime_error("Can not find spectra with ID: " + + boost::lexical_cast<std::string>(i) + + " in the workspace" + sourceWS.getName()); } size_t specN = itSpec->second; diff --git a/Framework/DataHandling/src/LoadSpiceXML2DDet.cpp b/Framework/DataHandling/src/LoadSpiceXML2DDet.cpp index b672bc6e373..5cab29da196 100644 --- a/Framework/DataHandling/src/LoadSpiceXML2DDet.cpp +++ b/Framework/DataHandling/src/LoadSpiceXML2DDet.cpp @@ -669,15 +669,15 @@ MatrixWorkspace_sptr LoadSpiceXML2DDet::createMatrixWorkspaceVersion2( } // END-FOR (xml nodes) // Add the property to output workspace - for (auto & miter : str_log_map) { + for (auto &miter : str_log_map) { outws->mutableRun().addProperty( new PropertyWithValue<std::string>(miter.first, miter.second)); } - for (auto & miter : int_log_map) { + for (auto &miter : int_log_map) { outws->mutableRun().addProperty( new PropertyWithValue<int>(miter.first, miter.second)); } - for (auto & miter : dbl_log_map) { + for (auto &miter : dbl_log_map) { outws->mutableRun().addProperty( new PropertyWithValue<double>(miter.first, miter.second)); } @@ -710,7 +710,7 @@ LoadSpiceXML2DDet::parseDetectorNode(const std::string &detvaluestr, // file records data in column major) size_t num_empty_line = 0; size_t num_weird_line = 0; - for (auto & vecLine : vecLines) { + for (auto &vecLine : vecLines) { if (vecLine.empty()) ++num_empty_line; else if (vecLine.size() < 100) diff --git a/Framework/DataHandling/src/SaveGSS.cpp b/Framework/DataHandling/src/SaveGSS.cpp index 1c5d47665fb..dd1410209b8 100644 --- a/Framework/DataHandling/src/SaveGSS.cpp +++ b/Framework/DataHandling/src/SaveGSS.cpp @@ -442,7 +442,7 @@ void SaveGSS::generateInstrumentHeader(std::stringstream &out, // write user header first if (m_user_specified_gsas_header.size() > 0) { - for (const auto & iter : m_user_specified_gsas_header) { + for (const auto &iter : m_user_specified_gsas_header) { out << iter << "\n"; } } diff --git a/Framework/DataHandling/test/FindDetectorsParTest.h b/Framework/DataHandling/test/FindDetectorsParTest.h index 8bf40a8bbc5..5d9785001ad 100644 --- a/Framework/DataHandling/test/FindDetectorsParTest.h +++ b/Framework/DataHandling/test/FindDetectorsParTest.h @@ -490,7 +490,7 @@ private: cont[2] = " 2. 3. -4. 5. 6. 2"; std::ofstream testFile(fileName); - for (const auto & i : cont) { + for (const auto &i : cont) { testFile << i << '\n'; } testFile.close(); @@ -503,7 +503,7 @@ private: cont[3] = "3. 4. -5. 6. 7. 3"; std::ofstream testFile(fileName); - for (const auto & i : cont) { + for (const auto &i : cont) { testFile << i << '\n'; } testFile.close(); @@ -516,7 +516,7 @@ private: cont[3] = "10 0 5.000 6.000 7.000 8.0000 3"; std::ofstream testFile(fileName); - for (const auto & i : cont) { + for (const auto &i : cont) { testFile << i << '\n'; } testFile.close(); @@ -527,7 +527,7 @@ private: cont[1] = "10 0 5.000 6.000 7.000 8.0000 1"; std::ofstream testFile(fileName); - for (const auto & i : cont) { + for (const auto &i : cont) { testFile << i << '\n'; } testFile.close(); diff --git a/Framework/DataHandling/test/LoadCalFileTest.h b/Framework/DataHandling/test/LoadCalFileTest.h index 3b0d6c53981..d4724f78271 100644 --- a/Framework/DataHandling/test/LoadCalFileTest.h +++ b/Framework/DataHandling/test/LoadCalFileTest.h @@ -125,7 +125,7 @@ public: } void tearDown() override { - for (auto & i : loadAlgPtrArray) { + for (auto &i : loadAlgPtrArray) { delete i; } loadAlgPtrArray.clear(); diff --git a/Framework/DataHandling/test/LoadEventNexusTest.h b/Framework/DataHandling/test/LoadEventNexusTest.h index 5c1864b6538..c49541b5900 100644 --- a/Framework/DataHandling/test/LoadEventNexusTest.h +++ b/Framework/DataHandling/test/LoadEventNexusTest.h @@ -295,7 +295,7 @@ public: double max = events.begin()->tof(); double min = events.begin()->tof(); - for (auto & event : events) { + for (auto &event : events) { max = event.tof() > max ? event.tof() : max; min = event.tof() < min ? event.tof() : min; } diff --git a/Framework/DataHandling/test/LoadEventPreNexus2Test.h b/Framework/DataHandling/test/LoadEventPreNexus2Test.h index 60ae2b3d852..ab5b1d7a5a8 100644 --- a/Framework/DataHandling/test/LoadEventPreNexus2Test.h +++ b/Framework/DataHandling/test/LoadEventPreNexus2Test.h @@ -135,7 +135,7 @@ public: Types::Core::DateAndTime start = it->first; std::vector<TofEvent> events1 = ew->getSpectrum(1000).getEvents(); - for (auto & i : events1) { + for (auto &i : events1) { std::cout << (i.pulseTime() - start) << " sec \n"; } } diff --git a/Framework/DataHandling/test/LoadNexusMonitorsTest.h b/Framework/DataHandling/test/LoadNexusMonitorsTest.h index 262f5ff2aba..b1a87e19a1e 100644 --- a/Framework/DataHandling/test/LoadNexusMonitorsTest.h +++ b/Framework/DataHandling/test/LoadNexusMonitorsTest.h @@ -167,7 +167,7 @@ public: // Count output workspaces int ws_count = 0; auto props = ld1.getProperties(); - for (auto & prop : props) + for (auto &prop : props) if (prop->type() == "Workspace") ws_count++; @@ -191,7 +191,7 @@ public: // Count output workspaces ws_count = 0; props = ld2.getProperties(); - for (auto & prop : props) + for (auto &prop : props) if (prop->type() == "Workspace") ws_count++; diff --git a/Framework/DataHandling/test/LoadTest.h b/Framework/DataHandling/test/LoadTest.h index 9a2622c1999..8ffc38e739f 100644 --- a/Framework/DataHandling/test/LoadTest.h +++ b/Framework/DataHandling/test/LoadTest.h @@ -112,7 +112,7 @@ public: const char *loadraw_props[NUMPROPS] = { "SpectrumMin", "SpectrumMax", "SpectrumList", "Cache", "LoadLogFiles"}; // Basic load has no additional loader properties - for (auto & loadraw_prop : loadraw_props) { + for (auto &loadraw_prop : loadraw_props) { TS_ASSERT_EQUALS(loader.existsProperty(loadraw_prop), false); } // After setting the file property, the algorithm should have aquired the @@ -120,7 +120,7 @@ public: TS_ASSERT_THROWS_NOTHING( loader.setPropertyValue("Filename", "IRS38633.raw")); // Now - for (auto & loadraw_prop : loadraw_props) { + for (auto &loadraw_prop : loadraw_props) { TS_ASSERT_EQUALS(loader.existsProperty(loadraw_prop), true); } diff --git a/Framework/DataHandling/test/SaveAscii2Test.h b/Framework/DataHandling/test/SaveAscii2Test.h index dd0602f2785..26ef97cb2da 100644 --- a/Framework/DataHandling/test/SaveAscii2Test.h +++ b/Framework/DataHandling/test/SaveAscii2Test.h @@ -68,7 +68,7 @@ public: std::getline(in, binlines); boost::split(binstr, binlines, boost::is_any_of(",")); - for (const auto & i : binstr) { + for (const auto &i : binstr) { bins.push_back(boost::lexical_cast<double>(i)); } TS_ASSERT_EQUALS(bins[0], 0); @@ -78,7 +78,7 @@ public: std::getline(in, binlines); bins.clear(); boost::split(binstr, binlines, boost::is_any_of(",")); - for (const auto & i : binstr) { + for (const auto &i : binstr) { bins.push_back(boost::lexical_cast<double>(i)); } TS_ASSERT_EQUALS(bins[0], 1.66667); @@ -165,7 +165,7 @@ public: std::getline(in, binlines); boost::split(binstr, binlines, boost::is_any_of(",")); - for (const auto & i : binstr) { + for (const auto &i : binstr) { bins.push_back(boost::lexical_cast<double>(i)); } TS_ASSERT_EQUALS(bins[0], 0); @@ -175,7 +175,7 @@ public: std::getline(in, binlines); bins.clear(); boost::split(binstr, binlines, boost::is_any_of(",")); - for (const auto & i : binstr) { + for (const auto &i : binstr) { bins.push_back(boost::lexical_cast<double>(i)); } TS_ASSERT_EQUALS(bins[0], 1.66667); @@ -589,7 +589,7 @@ public: std::getline(in, binlines); boost::split(binstr, binlines, boost::is_any_of(",")); - for (const auto & i : binstr) { + for (const auto &i : binstr) { bins.push_back(boost::lexical_cast<double>(i)); } TS_ASSERT_EQUALS(bins[0], 0); @@ -599,7 +599,7 @@ public: std::getline(in, binlines); bins.clear(); boost::split(binstr, binlines, boost::is_any_of(",")); - for (const auto & i : binstr) { + for (const auto &i : binstr) { bins.push_back(boost::lexical_cast<double>(i)); } TS_ASSERT_EQUALS(bins[0], 1.66667); diff --git a/Framework/DataHandling/test/SavePHXTest.h b/Framework/DataHandling/test/SavePHXTest.h index 036142ea726..e64993177da 100644 --- a/Framework/DataHandling/test/SavePHXTest.h +++ b/Framework/DataHandling/test/SavePHXTest.h @@ -139,7 +139,7 @@ public: sample_value[0] = (float)spTW->rowCount(); } else { size_t ii = 0; - for (const auto & i : column_name) { + for (const auto &i : column_name) { sample_value[ii] = (spTW->cell_cast<float>(ic - 1, i)); ii++; if (ii == 1) diff --git a/Framework/DataObjects/src/Workspace2D.cpp b/Framework/DataObjects/src/Workspace2D.cpp index 086697eff98..031507b1373 100644 --- a/Framework/DataObjects/src/Workspace2D.cpp +++ b/Framework/DataObjects/src/Workspace2D.cpp @@ -46,7 +46,7 @@ Workspace2D::~Workspace2D() { PARALLEL_FOR_IF(Kernel::threadSafe(*this)) for (int64_t i = 0; i < static_cast<int64_t>(data.size()); i++) { #else - for (auto & i : data) { + for (auto &i : data) { #endif // Clear out the memory delete i; @@ -107,7 +107,7 @@ void Workspace2D::init(const HistogramData::Histogram &histogram) { Histogram1D spec(initializedHistogram.xMode(), initializedHistogram.yMode()); spec.setHistogram(initializedHistogram); - for (auto & i : data) { + for (auto &i : data) { i = new Histogram1D(spec); } diff --git a/Framework/DataObjects/test/EventListTest.h b/Framework/DataObjects/test/EventListTest.h index 1b419d8a099..30b5161f111 100644 --- a/Framework/DataObjects/test/EventListTest.h +++ b/Framework/DataObjects/test/EventListTest.h @@ -1826,7 +1826,7 @@ public: } // Clean the pointers - for (auto & output : outputs) { + for (auto &output : outputs) { delete output.second; } @@ -1873,7 +1873,7 @@ public: } // Clean the pointers - for (auto & output : outputs) { + for (auto &output : outputs) { delete output.second; } @@ -2310,7 +2310,7 @@ public: TS_ASSERT_EQUALS(e7->getNumberEvents(), 1); // Clean the pointers - for (auto & output : outputs) { + for (auto &output : outputs) { delete output.second; } @@ -2382,7 +2382,7 @@ public: // TS_ASSERT_EQUALS(e7->getNumberEvents(), 1); // Clean the pointers - for (auto & output : outputs) { + for (auto &output : outputs) { delete output.second; } diff --git a/Framework/DataObjects/test/MDBoxTest.h b/Framework/DataObjects/test/MDBoxTest.h index 5700c6bbcc1..ab9b56a8a17 100644 --- a/Framework/DataObjects/test/MDBoxTest.h +++ b/Framework/DataObjects/test/MDBoxTest.h @@ -585,7 +585,7 @@ public: coord_t centroid[2] = {0, 0}; signal_t signal = 0.0; b.centroidSphere(sphere, 400., centroid, signal); - for (float & d : centroid) + for (float &d : centroid) d /= static_cast<coord_t>(signal); // This should be the weighted centroid @@ -595,10 +595,10 @@ public: // --- Reset and reduce the radius ------ signal = 0; - for (float & d : centroid) + for (float &d : centroid) d = 0.0; b.centroidSphere(sphere, 16., centroid, signal); - for (float & d : centroid) + for (float &d : centroid) d /= static_cast<coord_t>(signal); // Only one event was contained TS_ASSERT_DELTA(signal, 2.000, 0.001); diff --git a/Framework/DataObjects/test/MDGridBoxTest.h b/Framework/DataObjects/test/MDGridBoxTest.h index 77b0de9c5c7..b732a729bba 100644 --- a/Framework/DataObjects/test/MDGridBoxTest.h +++ b/Framework/DataObjects/test/MDGridBoxTest.h @@ -261,7 +261,7 @@ public: new MDGridBox<MDLeanEvent<1>, 1>(*box, newBoxController); auto boxes = box1->getBoxes(); - for (auto & box : boxes) { + for (auto &box : boxes) { TSM_ASSERT_EQUALS( "All child boxes should have the same box controller as the parent.", newBoxController, box->getBoxController()); @@ -329,7 +329,7 @@ public: // Check the boxes std::vector<MDBoxBase<MDLeanEvent<3>, 3> *> boxes = g->getBoxes(); TS_ASSERT_EQUALS(boxes.size(), 10 * 5 * 2); - for (auto & box : boxes) { + for (auto &box : boxes) { MDBox<MDLeanEvent<3>, 3> *box = dynamic_cast<MDBox<MDLeanEvent<3>, 3> *>(box); TS_ASSERT(box); @@ -602,7 +602,7 @@ public: parent->getBoxes(boxes, 3, false, function); TS_ASSERT_EQUALS(boxes.size(), 54); // The boxes extents make sense - for (auto & box : boxes) { + for (auto &box : boxes) { TS_ASSERT(box->getExtents(0).getMax() >= 1.51); } @@ -611,7 +611,7 @@ public: parent->getBoxes(boxes, 3, true, function); TS_ASSERT_EQUALS(boxes.size(), 40); // The boxes extents make sense - for (auto & box : boxes) { + for (auto &box : boxes) { TS_ASSERT(box->getExtents(0).getMax() >= 1.51); } @@ -622,7 +622,7 @@ public: boxes.clear(); parent->getBoxes(boxes, 3, false, function); TS_ASSERT_EQUALS(boxes.size(), 33); - for (auto & box : boxes) { + for (auto &box : boxes) { TS_ASSERT(box->getExtents(0).getMax() >= 1.51); TS_ASSERT(box->getExtents(0).getMin() <= 2.99); } @@ -631,7 +631,7 @@ public: boxes.clear(); parent->getBoxes(boxes, 3, true, function); TS_ASSERT_EQUALS(boxes.size(), 24); - for (auto & box : boxes) { + for (auto &box : boxes) { TS_ASSERT(box->getExtents(0).getMax() >= 1.51); TS_ASSERT(box->getExtents(0).getMin() <= 2.99); } @@ -675,7 +675,7 @@ public: parent->getBoxes(boxes, 3, false, function); TS_ASSERT_EQUALS(boxes.size(), 46); // The boxes extents make sense - for (auto & box : boxes) { + for (auto &box : boxes) { TS_ASSERT(box->getExtents(0).getMax() >= 2.00); TS_ASSERT(box->getExtents(0).getMin() <= 3.00); TS_ASSERT(box->getExtents(1).getMax() >= 2.00); @@ -690,7 +690,7 @@ public: 16 + 4 * 4 + 4); // 16 in the center one + 4x4 at the 4 edges + 4 at the corners // The boxes extents make sense - for (auto & box : boxes) { + for (auto &box : boxes) { TS_ASSERT(box->getExtents(0).getMax() >= 2.00); TS_ASSERT(box->getExtents(0).getMin() <= 3.00); TS_ASSERT(box->getExtents(1).getMax() >= 2.00); @@ -835,7 +835,7 @@ public: // Get all the boxes contained std::vector<MDBoxBase<MDLeanEvent<2>, 2> *> boxes = b->getBoxes(); TS_ASSERT_EQUALS(boxes.size(), 100); - for (auto & box : boxes) { + for (auto &box : boxes) { TS_ASSERT_EQUALS(box->getNPoints(), 1); TS_ASSERT_EQUALS(box->getSignal(), 2.0); TS_ASSERT_EQUALS(box->getErrorSquared(), 2.0); @@ -1404,7 +1404,7 @@ public: signal); // Normalized if (signal != 0.0) { - for (float & d : centroid) + for (float &d : centroid) d /= static_cast<coord_t>(signal); } @@ -1629,7 +1629,7 @@ public: rng, u); for (size_t i = 0; i < num; ++i) { double centers[3]; - for (double & center : centers) + for (double ¢er : centers) center = gen(); // Create and add the event. events.push_back(MDLeanEvent<3>(1.0, 1.0, centers)); @@ -1729,11 +1729,11 @@ public: coord_t centroid[3]; for (size_t i = 0; i < 100; i++) { signal = 0; - for (float & d : centroid) + for (float &d : centroid) d = 0.0; box3b->centroidSphere(sphere, radius * radius, centroid, signal); if (signal != 0.0) { - for (float & d : centroid) + for (float &d : centroid) d /= static_cast<coord_t>(signal); } } diff --git a/Framework/DataObjects/test/MDHistoWorkspaceIteratorTest.h b/Framework/DataObjects/test/MDHistoWorkspaceIteratorTest.h index 7e0c5709d98..be924a2d48a 100644 --- a/Framework/DataObjects/test/MDHistoWorkspaceIteratorTest.h +++ b/Framework/DataObjects/test/MDHistoWorkspaceIteratorTest.h @@ -681,7 +681,7 @@ public: neighbourIndexes = it->findNeighbourIndexesFaceTouching(); TS_ASSERT_EQUALS(4, neighbourIndexes.size()); std::vector<size_t> expected_neighbours = {0, 2, 5, 17}; - for (unsigned long & expected_neighbour : expected_neighbours) { + for (unsigned long &expected_neighbour : expected_neighbours) { TS_ASSERT(doesContainIndex(neighbourIndexes, expected_neighbour)); } @@ -693,7 +693,7 @@ public: // Is completely enclosed expected_neighbours = {17, 20, 22, 25, 5, 37}; - for (unsigned long & expected_neighbour : expected_neighbours) { + for (unsigned long &expected_neighbour : expected_neighbours) { TS_ASSERT(doesContainIndex(neighbourIndexes, expected_neighbour)); } @@ -704,7 +704,7 @@ public: // Is on edge expected_neighbours = {47, 59, 62}; - for (unsigned long & expected_neighbour : expected_neighbours) { + for (unsigned long &expected_neighbour : expected_neighbours) { TS_ASSERT(doesContainIndex(neighbourIndexes, expected_neighbour)); } @@ -759,7 +759,7 @@ public: TS_ASSERT_EQUALS(11, neighbourIndexes.size()); std::vector<size_t> expected_neighbours = {0, 2, 4, 5, 6, 16, 17, 18, 20, 21, 22, 22}; - for (unsigned long & expected_neighbour : expected_neighbours) { + for (unsigned long &expected_neighbour : expected_neighbours) { TS_ASSERT(doesContainIndex(neighbourIndexes, expected_neighbour)); } @@ -772,7 +772,7 @@ public: expected_neighbours = {0, 1, 2, 4, 5, 6, 8, 9, 10, 16, 17, 18, 22, 20, 24, 25, 26, 32, 33, 34, 37, 38, 36, 41, 40, 42}; - for (unsigned long & expected_neighbour : expected_neighbours) { + for (unsigned long &expected_neighbour : expected_neighbours) { TS_ASSERT(doesContainIndex(neighbourIndexes, expected_neighbour)); } @@ -783,7 +783,7 @@ public: // Is on edge expected_neighbours = {42, 43, 46, 47, 58, 59, 62}; - for (unsigned long & expected_neighbour : expected_neighbours) { + for (unsigned long &expected_neighbour : expected_neighbours) { TS_ASSERT(doesContainIndex(neighbourIndexes, expected_neighbour)); } diff --git a/Framework/Geometry/src/Rendering/vtkGeometryCacheReader.cpp b/Framework/Geometry/src/Rendering/vtkGeometryCacheReader.cpp index ac7dce31204..1b770483367 100644 --- a/Framework/Geometry/src/Rendering/vtkGeometryCacheReader.cpp +++ b/Framework/Geometry/src/Rendering/vtkGeometryCacheReader.cpp @@ -128,7 +128,7 @@ void vtkGeometryCacheReader::readPoints(Poco::XML::Element *pEle, if (pEle->getAttribute("format") == "ascii") { // Read from Ascii std::stringstream buf; buf << pEle->innerText(); - for (double & point : points) { + for (double &point : points) { buf >> point; } } @@ -155,7 +155,7 @@ void vtkGeometryCacheReader::readTriangles(Poco::XML::Element *pEle, if (pEle->getAttribute("format") == "ascii") { // Read from Ascii std::stringstream buf; buf << pEle->innerText(); - for (unsigned int & face : faces) { + for (unsigned int &face : faces) { buf >> face; } } diff --git a/Framework/Geometry/test/CSGObjectTest.h b/Framework/Geometry/test/CSGObjectTest.h index bdbfe99de76..4c4050c9375 100644 --- a/Framework/Geometry/test/CSGObjectTest.h +++ b/Framework/Geometry/test/CSGObjectTest.h @@ -1270,12 +1270,12 @@ private: SurfLine.push_back(SCompT(73, "s 0.6 0 0 0.4")); // Note that the testObject now manages the "new Plane" - for (const auto & vc : SurfLine) { + for (const auto &vc : SurfLine) { auto A = Geometry::SurfaceFactory::Instance()->processLine(vc.second); TSM_ASSERT("Expected a non-null surface from the factory", A); A->setName(vc.first); - SMap.insert(STYPE::value_type(vc.first, - boost::shared_ptr<Surface>(A.release()))); + SMap.insert( + STYPE::value_type(vc.first, boost::shared_ptr<Surface>(A.release()))); } return; diff --git a/Framework/Geometry/test/CenteringGroupTest.h b/Framework/Geometry/test/CenteringGroupTest.h index d48eed4c235..8db17e52a86 100644 --- a/Framework/Geometry/test/CenteringGroupTest.h +++ b/Framework/Geometry/test/CenteringGroupTest.h @@ -65,8 +65,9 @@ private: TSM_ASSERT_EQUALS("Unexpected number of operations for " + symbol, ops.size(), expectedOperations.size()); - for (const auto & expectedOperation : expectedOperations) { - TSM_ASSERT("Operation " + expectedOperation.identifier() + " not found in " + symbol, + for (const auto &expectedOperation : expectedOperations) { + TSM_ASSERT("Operation " + expectedOperation.identifier() + + " not found in " + symbol, symOpExistsInCollection(expectedOperation, ops)); } diff --git a/Framework/Geometry/test/CompositeBraggScattererTest.h b/Framework/Geometry/test/CompositeBraggScattererTest.h index 50755c0d8ee..0ca949e6122 100644 --- a/Framework/Geometry/test/CompositeBraggScattererTest.h +++ b/Framework/Geometry/test/CompositeBraggScattererTest.h @@ -130,7 +130,7 @@ public: spaceGroup->getEquivalentPositions(V3D(0.2, 0.3, 0.4)); CompositeBraggScatterer_sptr coll = CompositeBraggScatterer::create(); - for (auto & position : positions) { + for (auto &position : positions) { std::ostringstream strm; strm << position; coll->addScatterer(getInitializedScatterer("Si", strm.str(), 0.01267)); diff --git a/Framework/Geometry/test/GroupTransformationTest.h b/Framework/Geometry/test/GroupTransformationTest.h index 71792678165..8d54c5029f0 100644 --- a/Framework/Geometry/test/GroupTransformationTest.h +++ b/Framework/Geometry/test/GroupTransformationTest.h @@ -51,7 +51,7 @@ public: */ std::unordered_set<std::string> elements; std::vector<SymmetryOperation> ops = transformed.getSymmetryOperations(); - for (auto & op : ops) { + for (auto &op : ops) { SymmetryElement_sptr el = SymmetryElementFactory::Instance().createSymElement(op); diff --git a/Framework/Geometry/test/IndexingUtilsTest.h b/Framework/Geometry/test/IndexingUtilsTest.h index f63fc709e95..e8065f52a91 100644 --- a/Framework/Geometry/test/IndexingUtilsTest.h +++ b/Framework/Geometry/test/IndexingUtilsTest.h @@ -29,7 +29,7 @@ public: {-0.90478, -0.50667, 0.51072}, {-0.50387, -0.58561, 0.43502}}; // Dec 2011: Change convention for Q = 2 pi / wavelength - for (auto & q_vector : q_vectors) + for (auto &q_vector : q_vectors) q_vector *= (2.0 * M_PI); return q_vectors; } @@ -372,7 +372,7 @@ public: {2.66668320, 5.29605670, 7.9653444}}; std::vector<V3D> directions; - for (auto & vector : vectors) + for (auto &vector : vectors) directions.emplace_back(vector[0], vector[1], vector[2]); double required_tolerance = 0.12; @@ -410,7 +410,7 @@ public: {2.66668320, 5.29605670, 7.9653444}}; std::vector<V3D> directions; - for (auto & vector : vectors) + for (auto &vector : vectors) directions.emplace_back(vector[0], vector[1], vector[2]); std::vector<V3D> q_vectors = getNatroliteQs(); @@ -756,7 +756,7 @@ public: TS_ASSERT_DELTA(direction_list[7].Z(), -0.211325, 1e-5); double dot_prod; - for (const auto & i : direction_list) { + for (const auto &i : direction_list) { dot_prod = axis.scalar_prod(i); TS_ASSERT_DELTA(dot_prod, 0, 1e-10); } diff --git a/Framework/Geometry/test/PointGroupTest.h b/Framework/Geometry/test/PointGroupTest.h index a822cebbea2..1165941734b 100644 --- a/Framework/Geometry/test/PointGroupTest.h +++ b/Framework/Geometry/test/PointGroupTest.h @@ -289,7 +289,7 @@ public: std::vector<PointGroup_sptr> pointgroups = getAllPointGroups(); - for (auto & pointgroup : pointgroups) { + for (auto &pointgroup : pointgroups) { TSM_ASSERT_EQUALS(pointgroup->getSymbol() + ": Unexpected crystal system.", pointgroup->crystalSystem(), @@ -446,7 +446,7 @@ private: t.reset(); int h = 0; for (size_t i = 0; i < 1000; ++i) { - for (auto & hkl : hkls) { + for (auto &hkl : hkls) { bool eq = pointGroup->isEquivalent(base, hkl); if (eq) { ++h; diff --git a/Framework/Geometry/test/ReflectionConditionTest.h b/Framework/Geometry/test/ReflectionConditionTest.h index f55d5272e1f..c3400542045 100644 --- a/Framework/Geometry/test/ReflectionConditionTest.h +++ b/Framework/Geometry/test/ReflectionConditionTest.h @@ -58,7 +58,7 @@ public: centeringSymbols.insert("H"); std::vector<ReflectionCondition_sptr> refs = getAllReflectionConditions(); - for (auto & ref : refs) { + for (auto &ref : refs) { TSM_ASSERT_DIFFERS(ref->getSymbol(), centeringSymbols.find(ref->getSymbol()), centeringSymbols.end()); diff --git a/Framework/Geometry/test/SpaceGroupTest.h b/Framework/Geometry/test/SpaceGroupTest.h index 1e3dec0ca6e..363d32d0d38 100644 --- a/Framework/Geometry/test/SpaceGroupTest.h +++ b/Framework/Geometry/test/SpaceGroupTest.h @@ -66,7 +66,7 @@ public: SpaceGroup spaceGroup(167, "R-3c", *(group * centering)); std::vector<V3D> byOperator = spaceGroup * V3D(0.3, 0.0, 0.25); - for (auto & i : byOperator) { + for (auto &i : byOperator) { i = getWrappedVector(i); } std::sort(byOperator.begin(), byOperator.end()); @@ -86,7 +86,7 @@ public: SpaceGroup spaceGroup = getSpaceGroupR3m(); std::vector<V3D> byOperator = spaceGroup * V3D(0.5, 0.0, 0.0); - for (auto & i : byOperator) { + for (auto &i : byOperator) { i = getWrappedVector(i); } std::sort(byOperator.begin(), byOperator.end()); diff --git a/Framework/Geometry/test/SymmetryOperationFactoryTest.h b/Framework/Geometry/test/SymmetryOperationFactoryTest.h index b1a76628f19..978514be0ba 100644 --- a/Framework/Geometry/test/SymmetryOperationFactoryTest.h +++ b/Framework/Geometry/test/SymmetryOperationFactoryTest.h @@ -125,7 +125,7 @@ public: // Clear factory std::vector<std::string> allSymbols = SymmetryOperationFactory::Instance().subscribedSymbols(); - for (auto & symbol : allSymbols) { + for (auto &symbol : allSymbols) { SymmetryOperationFactory::Instance().unsubscribeSymOp(symbol); } @@ -146,7 +146,7 @@ public: SymmetryOperationFactory::Instance().unsubscribeSymOp("-x,-y,-z"); // Restore factory - for (auto & symbol : allSymbols) { + for (auto &symbol : allSymbols) { SymmetryOperationFactory::Instance().subscribeSymOp(symbol); } } diff --git a/Framework/Kernel/test/ConfigServiceTest.h b/Framework/Kernel/test/ConfigServiceTest.h index 31b1a01e135..0485fd2b6c0 100644 --- a/Framework/Kernel/test/ConfigServiceTest.h +++ b/Framework/Kernel/test/ConfigServiceTest.h @@ -352,7 +352,7 @@ public: ConfigService::Instance().getInstrumentDirectory()); // check all of the directory entries actually exist - for (auto & directoryPath : directories) { + for (auto &directoryPath : directories) { Poco::File directory(directoryPath); TSM_ASSERT(directoryPath + " does not exist", directory.exists()); } diff --git a/Framework/Kernel/test/DiskBufferISaveableTest.h b/Framework/Kernel/test/DiskBufferISaveableTest.h index 20b9639a5e0..da1a11e7397 100644 --- a/Framework/Kernel/test/DiskBufferISaveableTest.h +++ b/Framework/Kernel/test/DiskBufferISaveableTest.h @@ -90,14 +90,14 @@ public: } void tearDown() override { - for (auto & item : data) { + for (auto &item : data) { delete item; } - - for (auto & bigItem : bigData) { + + for (auto &bigItem : bigData) { delete bigItem; } - + ISaveableTester::fakeFile = ""; } void testIsaveable() { @@ -434,7 +434,7 @@ public: void test_smallCache_writeBuffer() { CPUTimer tim; DiskBuffer dbuf(3); - for (auto & i : data) { + for (auto &i : data) { dbuf.toWrite(i); i->setBusy(false); } @@ -444,11 +444,11 @@ public: void test_smallCache_no_writeBuffer() { CPUTimer tim; DiskBuffer dbuf(0); - for (auto & i : data) { + for (auto &i : data) { i->setBusy(true); // Items won't do any real saving } - for (auto & i : data) { + for (auto &i : data) { dbuf.toWrite(i); i->setBusy(false); } @@ -459,7 +459,7 @@ public: void test_largeCache_writeBuffer() { CPUTimer tim; DiskBuffer dbuf(1000); - for (auto & i : data) { + for (auto &i : data) { dbuf.toWrite(i); i->setBusy(false); } @@ -469,7 +469,7 @@ public: void test_largeCache_noWriteBuffer() { CPUTimer tim; DiskBuffer dbuf(0); - for (auto & i : data) { + for (auto &i : data) { dbuf.toWrite(i); i->setBusy(false); } diff --git a/Framework/Kernel/test/DiskBufferTest.h b/Framework/Kernel/test/DiskBufferTest.h index 17df0e8a1cd..4911bcdaca6 100644 --- a/Framework/Kernel/test/DiskBufferTest.h +++ b/Framework/Kernel/test/DiskBufferTest.h @@ -115,7 +115,7 @@ public: } void tearDown() override { - for (auto & i : data) { + for (auto &i : data) { delete i; } } @@ -170,7 +170,7 @@ public: ////-------------------------------------------------------------------------------- ///** Sorts by file position when writing to a file */ void test_writesOutInFileOrder() { - for (auto & i : data) { + for (auto &i : data) { i->setDataChanged(); } // Room for 2 objects of size 2 in the to-write cache @@ -795,7 +795,7 @@ public: void test_withFakeSeeking_withWriteBuffer() { CPUTimer tim; DiskBuffer dbuf(10); - for (auto & i : dataSeek) { + for (auto &i : dataSeek) { // Pretend you just loaded the data i->load(dbuf); } @@ -808,7 +808,7 @@ public: void test_withFakeSeeking_noWriteBuffer() { CPUTimer tim; DiskBuffer dbuf(0); - for (auto & i : dataSeek) { + for (auto &i : dataSeek) { // Pretend you just loaded the data i->load(dbuf); } @@ -822,7 +822,7 @@ public: CPUTimer tim; DiskBuffer dbuf(20); dbuf.setFileLength(dataSeek.size()); - for (auto & i : dataSeek) { + for (auto &i : dataSeek) { // Pretend you just loaded the data i->grow(dbuf, true); dbuf.toWrite(i); @@ -839,7 +839,7 @@ public: void test_withFakeSeeking_growingData_savingWithoutUsingMRU() { CPUTimer tim; DiskBuffer dbuf(dataSeek.size()); - for (auto & i : dataSeek) { + for (auto &i : dataSeek) { // Pretend you just loaded the data i->grow(dbuf, false); i->save(); diff --git a/Framework/Kernel/test/FileDescriptorTest.h b/Framework/Kernel/test/FileDescriptorTest.h index d2b6f00072d..a3957fa4433 100644 --- a/Framework/Kernel/test/FileDescriptorTest.h +++ b/Framework/Kernel/test/FileDescriptorTest.h @@ -23,7 +23,7 @@ public: auto &cfg = Mantid::Kernel::ConfigService::Instance(); cfg.reset(); const auto &dataPaths = cfg.getDataSearchDirs(); - for (const auto & dataPath : dataPaths) { + for (const auto &dataPath : dataPaths) { Poco::Path nxsPath(dataPath, "CNCS_7860_event.nxs"); if (Poco::File(nxsPath).exists()) m_testNexusPath = nxsPath.toString(); diff --git a/Framework/Kernel/test/GlobTest.h b/Framework/Kernel/test/GlobTest.h index c2ff7e21d6c..92057289d2f 100644 --- a/Framework/Kernel/test/GlobTest.h +++ b/Framework/Kernel/test/GlobTest.h @@ -34,7 +34,7 @@ public: TS_ASSERT(files.size() > 0); size_t matches = 0; - for (const auto & file : files) { + for (const auto &file : files) { Poco::Path path = file; std::string project = path[path.depth() - 1]; if (project == "API") @@ -95,7 +95,7 @@ public: TS_ASSERT(files.size() > 0); size_t matches = 0; - for (const auto & file : files) { + for (const auto &file : files) { Poco::Path path = file; std::string project = path[path.depth() - 1]; if (project == "API") diff --git a/Framework/Kernel/test/MutexTest.h b/Framework/Kernel/test/MutexTest.h index a7398f7569d..e85fac873cc 100644 --- a/Framework/Kernel/test/MutexTest.h +++ b/Framework/Kernel/test/MutexTest.h @@ -37,7 +37,7 @@ void unconditional_writer() { // do work here, with exclusive access shared_data.resize(shared_data.size() + 1, 2.345); // Dumb thing to slow down the writer - for (double & i : shared_data) + for (double &i : shared_data) i = 4.567; // std::cout << "Write finished\n"; } diff --git a/Framework/Kernel/test/NexusDescriptorTest.h b/Framework/Kernel/test/NexusDescriptorTest.h index 696985dc9b4..0238213b82a 100644 --- a/Framework/Kernel/test/NexusDescriptorTest.h +++ b/Framework/Kernel/test/NexusDescriptorTest.h @@ -28,7 +28,7 @@ public: NexusDescriptorTest() { using Mantid::Kernel::ConfigService; auto dataPaths = ConfigService::Instance().getDataSearchDirs(); - for (auto & dataPath : dataPaths) { + for (auto &dataPath : dataPaths) { Poco::Path hdf5Path(dataPath, "CNCS_7860_event.nxs"); if (Poco::File(hdf5Path).exists()) m_testHDF5Path = hdf5Path.toString(); diff --git a/Framework/Kernel/test/PropertyWithValueTest.h b/Framework/Kernel/test/PropertyWithValueTest.h index f6ece0cd2a9..6f3d65b5a80 100644 --- a/Framework/Kernel/test/PropertyWithValueTest.h +++ b/Framework/Kernel/test/PropertyWithValueTest.h @@ -690,7 +690,7 @@ public: auto values = property.allowedValues(); auto possibilities = OptionalBool::strToEmumMap(); TSM_ASSERT_EQUALS("3 states allowed", possibilities.size(), values.size()); - for (auto & value : values) { + for (auto &value : values) { TSM_ASSERT("value not a known state", possibilities.find(value) != possibilities.end()); } diff --git a/Framework/Kernel/test/SobolSequenceTest.h b/Framework/Kernel/test/SobolSequenceTest.h index f1cd582dc04..3abe083aa37 100644 --- a/Framework/Kernel/test/SobolSequenceTest.h +++ b/Framework/Kernel/test/SobolSequenceTest.h @@ -87,7 +87,7 @@ private: {0.75, 0.25, 0.75, 0.25, 0.75}, {0.25, 0.75, 0.25, 0.75, 0.25}, }; - for (auto & expectedValue : expectedValues) { + for (auto &expectedValue : expectedValues) { const std::vector<double> randPoint = randGen.nextPoint(); for (std::size_t j = 0; j < 5; ++j) { TS_ASSERT_DELTA(randPoint[j], expectedValue[j], 1e-12); diff --git a/Framework/Kernel/test/ThreadSchedulerTest.h b/Framework/Kernel/test/ThreadSchedulerTest.h index dd55283e826..60be77fbe9b 100644 --- a/Framework/Kernel/test/ThreadSchedulerTest.h +++ b/Framework/Kernel/test/ThreadSchedulerTest.h @@ -87,7 +87,7 @@ public: // And ThreadScheduler does not delete popped tasks in this way TS_ASSERT_EQUALS(ThreadSchedulerTest_numDestructed, 0); - for (auto & task : tasks) { + for (auto &task : tasks) { delete task; } } diff --git a/Framework/Kernel/test/UsageServiceTest.h b/Framework/Kernel/test/UsageServiceTest.h index 20e3b45b795..022d88b7c38 100644 --- a/Framework/Kernel/test/UsageServiceTest.h +++ b/Framework/Kernel/test/UsageServiceTest.h @@ -101,7 +101,7 @@ public: } auto features = root["features"]; - for (auto & feature : features) { + for (auto &feature : features) { std::string name = feature["name"].asString(); std::string type = feature["type"].asString(); bool internal = feature["internal"].asBool(); diff --git a/Framework/MDAlgorithms/test/LoadMDTest.h b/Framework/MDAlgorithms/test/LoadMDTest.h index bc0c3cdc469..34b6fc485f4 100644 --- a/Framework/MDAlgorithms/test/LoadMDTest.h +++ b/Framework/MDAlgorithms/test/LoadMDTest.h @@ -253,7 +253,7 @@ public: typename std::vector<API::IMDNode *> boxes; ws->getBox()->getBoxes(boxes, 1000, false); - for (auto & boxe : boxes) { + for (auto &boxe : boxes) { MDBox<MDE, nd> *box = dynamic_cast<MDBox<MDE, nd> *>(boxe); if (box) { TSM_ASSERT("Large box should not be in memory", diff --git a/Framework/MDAlgorithms/test/MDTransfQ3DTest.h b/Framework/MDAlgorithms/test/MDTransfQ3DTest.h index 9e544bdfbab..81f46d2f193 100644 --- a/Framework/MDAlgorithms/test/MDTransfQ3DTest.h +++ b/Framework/MDAlgorithms/test/MDTransfQ3DTest.h @@ -116,7 +116,7 @@ public: // testing purposes here auto &TwoTheta = const_cast<std::vector<double> &>( WSDescr.m_PreprDetTable->getColVector<double>("TwoTheta")); - for (double & i : TwoTheta) { + for (double &i : TwoTheta) { i = 0; } diff --git a/Framework/MDAlgorithms/test/MergeMDFilesTest.h b/Framework/MDAlgorithms/test/MergeMDFilesTest.h index 3ce1e665ca3..f20739fa839 100644 --- a/Framework/MDAlgorithms/test/MergeMDFilesTest.h +++ b/Framework/MDAlgorithms/test/MergeMDFilesTest.h @@ -102,7 +102,7 @@ public: } // Cleanup generated input files - for (auto & inWorkspace : inWorkspaces) { + for (auto &inWorkspace : inWorkspaces) { if (inWorkspace->getBoxController()->isFileBacked()) { std::string fileName = inWorkspace->getBoxController()->getFileIO()->getFileName(); diff --git a/Framework/MDAlgorithms/test/ReplicateMDTest.h b/Framework/MDAlgorithms/test/ReplicateMDTest.h index 30b0ac49443..68a25f36780 100644 --- a/Framework/MDAlgorithms/test/ReplicateMDTest.h +++ b/Framework/MDAlgorithms/test/ReplicateMDTest.h @@ -77,7 +77,7 @@ MDHistoWorkspace_sptr makeHistoWorkspace(const std::vector<int> &shape, // Generate the axis order 0, 1, 2 ... in reverse std::vector<int> axes(outWs->getNumDims()); Decreasing op(outWs->getNumDims()); - for (int & axis : axes) { + for (int &axis : axes) { axis = static_cast<int>(op()); } diff --git a/Framework/MDAlgorithms/test/TobyFitYVectorTest.h b/Framework/MDAlgorithms/test/TobyFitYVectorTest.h index c1300285c2a..497046f3e93 100644 --- a/Framework/MDAlgorithms/test/TobyFitYVectorTest.h +++ b/Framework/MDAlgorithms/test/TobyFitYVectorTest.h @@ -45,7 +45,7 @@ public: "DetectorArea", "DetectionTime"}; TobyFitYVector yVector; - for (auto & attr : attrs) { + for (auto &attr : attrs) { yVector.setAttribute(attr, IFunction::Attribute(false)); } diff --git a/Framework/PythonInterface/mantid/dataobjects/src/Exports/Workspace2D.cpp b/Framework/PythonInterface/mantid/dataobjects/src/Exports/Workspace2D.cpp index 3428d41720e..f19bdbe5279 100644 --- a/Framework/PythonInterface/mantid/dataobjects/src/Exports/Workspace2D.cpp +++ b/Framework/PythonInterface/mantid/dataobjects/src/Exports/Workspace2D.cpp @@ -72,7 +72,7 @@ public: const auto &spectrumDefinition = (*spectrumDefinitions)[i]; std::vector<size_t> detectorIndices; - for (const auto & j : spectrumDefinition) { + for (const auto &j : spectrumDefinition) { size_t detectorIndex = j.first; detectorIndices.emplace_back(std::move(detectorIndex)); } diff --git a/Framework/RemoteAlgorithms/test/AbortRemoteJob2Test.h b/Framework/RemoteAlgorithms/test/AbortRemoteJob2Test.h index 40becff6f14..56c48dc08ff 100644 --- a/Framework/RemoteAlgorithms/test/AbortRemoteJob2Test.h +++ b/Framework/RemoteAlgorithms/test/AbortRemoteJob2Test.h @@ -98,7 +98,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const std::string facName = testFacility.first; const std::string compName = testFacility.second; diff --git a/Framework/RemoteAlgorithms/test/AbortRemoteJobTest.h b/Framework/RemoteAlgorithms/test/AbortRemoteJobTest.h index 5e9602f3f9b..5583ee32899 100644 --- a/Framework/RemoteAlgorithms/test/AbortRemoteJobTest.h +++ b/Framework/RemoteAlgorithms/test/AbortRemoteJobTest.h @@ -96,7 +96,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const std::string facName = testFacility.first; const std::string compName = testFacility.second; diff --git a/Framework/RemoteAlgorithms/test/Authenticate2Test.h b/Framework/RemoteAlgorithms/test/Authenticate2Test.h index a1317b264cb..3dfb66430a7 100644 --- a/Framework/RemoteAlgorithms/test/Authenticate2Test.h +++ b/Framework/RemoteAlgorithms/test/Authenticate2Test.h @@ -99,7 +99,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const std::string facName = testFacility.first; const std::string compName = testFacility.second; diff --git a/Framework/RemoteAlgorithms/test/AuthenticateTest.h b/Framework/RemoteAlgorithms/test/AuthenticateTest.h index 052af5b8b8a..f8a074242f2 100644 --- a/Framework/RemoteAlgorithms/test/AuthenticateTest.h +++ b/Framework/RemoteAlgorithms/test/AuthenticateTest.h @@ -99,7 +99,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const std::string facName = testFacility.first; const std::string compName = testFacility.second; diff --git a/Framework/RemoteAlgorithms/test/DownloadRemoteFile2Test.h b/Framework/RemoteAlgorithms/test/DownloadRemoteFile2Test.h index 9f22226670b..9d5dc8c4346 100644 --- a/Framework/RemoteAlgorithms/test/DownloadRemoteFile2Test.h +++ b/Framework/RemoteAlgorithms/test/DownloadRemoteFile2Test.h @@ -104,7 +104,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const std::string facName = testFacility.first; const std::string compName = testFacility.second; diff --git a/Framework/RemoteAlgorithms/test/DownloadRemoteFileTest.h b/Framework/RemoteAlgorithms/test/DownloadRemoteFileTest.h index 36f6ee0e4dd..7ecc3244762 100644 --- a/Framework/RemoteAlgorithms/test/DownloadRemoteFileTest.h +++ b/Framework/RemoteAlgorithms/test/DownloadRemoteFileTest.h @@ -104,7 +104,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const std::string facName = testFacility.first; const std::string compName = testFacility.second; diff --git a/Framework/RemoteAlgorithms/test/Logout2Test.h b/Framework/RemoteAlgorithms/test/Logout2Test.h index 7572c525137..fc271f6d8ac 100644 --- a/Framework/RemoteAlgorithms/test/Logout2Test.h +++ b/Framework/RemoteAlgorithms/test/Logout2Test.h @@ -72,7 +72,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); // test that job managers are created correctly for different facilities - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const std::string facName = testFacility.first; const std::string compName = testFacility.second; diff --git a/Framework/RemoteAlgorithms/test/QueryAllRemoteJobs2Test.h b/Framework/RemoteAlgorithms/test/QueryAllRemoteJobs2Test.h index 7a0b97f2c58..6ec451c5658 100644 --- a/Framework/RemoteAlgorithms/test/QueryAllRemoteJobs2Test.h +++ b/Framework/RemoteAlgorithms/test/QueryAllRemoteJobs2Test.h @@ -81,7 +81,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const auto facName = testFacility.first; const auto compName = testFacility.second; diff --git a/Framework/RemoteAlgorithms/test/QueryAllRemoteJobsTest.h b/Framework/RemoteAlgorithms/test/QueryAllRemoteJobsTest.h index b544d032b0c..da759801f3c 100644 --- a/Framework/RemoteAlgorithms/test/QueryAllRemoteJobsTest.h +++ b/Framework/RemoteAlgorithms/test/QueryAllRemoteJobsTest.h @@ -81,7 +81,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const std::string facName = testFacility.first; const std::string compName = testFacility.second; diff --git a/Framework/RemoteAlgorithms/test/QueryRemoteFile2Test.h b/Framework/RemoteAlgorithms/test/QueryRemoteFile2Test.h index d74e168ae70..3d02988843a 100644 --- a/Framework/RemoteAlgorithms/test/QueryRemoteFile2Test.h +++ b/Framework/RemoteAlgorithms/test/QueryRemoteFile2Test.h @@ -91,7 +91,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const std::string facName = testFacility.first; const std::string compName = testFacility.second; diff --git a/Framework/RemoteAlgorithms/test/QueryRemoteFileTest.h b/Framework/RemoteAlgorithms/test/QueryRemoteFileTest.h index d9141985296..04427da0791 100644 --- a/Framework/RemoteAlgorithms/test/QueryRemoteFileTest.h +++ b/Framework/RemoteAlgorithms/test/QueryRemoteFileTest.h @@ -91,7 +91,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const std::string facName = testFacility.first; const std::string compName = testFacility.second; diff --git a/Framework/RemoteAlgorithms/test/QueryRemoteJob2Test.h b/Framework/RemoteAlgorithms/test/QueryRemoteJob2Test.h index f5c530592d7..bd7403c5641 100644 --- a/Framework/RemoteAlgorithms/test/QueryRemoteJob2Test.h +++ b/Framework/RemoteAlgorithms/test/QueryRemoteJob2Test.h @@ -90,7 +90,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const std::string facName = testFacility.first; const std::string compName = testFacility.second; diff --git a/Framework/RemoteAlgorithms/test/QueryRemoteJobTest.h b/Framework/RemoteAlgorithms/test/QueryRemoteJobTest.h index a664f8f8b47..97cd9d135e0 100644 --- a/Framework/RemoteAlgorithms/test/QueryRemoteJobTest.h +++ b/Framework/RemoteAlgorithms/test/QueryRemoteJobTest.h @@ -88,7 +88,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const std::string facName = testFacility.first; const std::string compName = testFacility.second; diff --git a/Framework/RemoteAlgorithms/test/StartRemoteTransaction2Test.h b/Framework/RemoteAlgorithms/test/StartRemoteTransaction2Test.h index d2f4959d20f..f6c86ce3195 100644 --- a/Framework/RemoteAlgorithms/test/StartRemoteTransaction2Test.h +++ b/Framework/RemoteAlgorithms/test/StartRemoteTransaction2Test.h @@ -91,7 +91,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const std::string facName = testFacility.first; const std::string compName = testFacility.second; diff --git a/Framework/RemoteAlgorithms/test/StartRemoteTransactionTest.h b/Framework/RemoteAlgorithms/test/StartRemoteTransactionTest.h index d232d3a4e77..006b409dfc6 100644 --- a/Framework/RemoteAlgorithms/test/StartRemoteTransactionTest.h +++ b/Framework/RemoteAlgorithms/test/StartRemoteTransactionTest.h @@ -91,7 +91,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const std::string facName = testFacility.first; const std::string compName = testFacility.second; diff --git a/Framework/RemoteAlgorithms/test/StopRemoteTransaction2Test.h b/Framework/RemoteAlgorithms/test/StopRemoteTransaction2Test.h index 3b3d66e2359..1c3cf78170d 100644 --- a/Framework/RemoteAlgorithms/test/StopRemoteTransaction2Test.h +++ b/Framework/RemoteAlgorithms/test/StopRemoteTransaction2Test.h @@ -93,7 +93,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const std::string facName = testFacility.first; const std::string compName = testFacility.second; diff --git a/Framework/RemoteAlgorithms/test/StopRemoteTransactionTest.h b/Framework/RemoteAlgorithms/test/StopRemoteTransactionTest.h index c9f6ba979af..1449876e836 100644 --- a/Framework/RemoteAlgorithms/test/StopRemoteTransactionTest.h +++ b/Framework/RemoteAlgorithms/test/StopRemoteTransactionTest.h @@ -93,7 +93,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const std::string facName = testFacility.first; const std::string compName = testFacility.second; diff --git a/Framework/RemoteAlgorithms/test/SubmitRemoteJob2Test.h b/Framework/RemoteAlgorithms/test/SubmitRemoteJob2Test.h index ee14d4fd074..edf6b121523 100644 --- a/Framework/RemoteAlgorithms/test/SubmitRemoteJob2Test.h +++ b/Framework/RemoteAlgorithms/test/SubmitRemoteJob2Test.h @@ -157,7 +157,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const std::string facName = testFacility.first; const std::string compName = testFacility.second; diff --git a/Framework/RemoteAlgorithms/test/SubmitRemoteJobTest.h b/Framework/RemoteAlgorithms/test/SubmitRemoteJobTest.h index b27935acc85..cbe9053f8ad 100644 --- a/Framework/RemoteAlgorithms/test/SubmitRemoteJobTest.h +++ b/Framework/RemoteAlgorithms/test/SubmitRemoteJobTest.h @@ -157,7 +157,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const std::string facName = testFacility.first; const std::string compName = testFacility.second; diff --git a/Framework/RemoteAlgorithms/test/UploadRemoteFile2Test.h b/Framework/RemoteAlgorithms/test/UploadRemoteFile2Test.h index d1f65177c03..18a8031f5f8 100644 --- a/Framework/RemoteAlgorithms/test/UploadRemoteFile2Test.h +++ b/Framework/RemoteAlgorithms/test/UploadRemoteFile2Test.h @@ -124,7 +124,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const std::string facName = testFacility.first; const std::string compName = testFacility.second; diff --git a/Framework/RemoteAlgorithms/test/UploadRemoteFileTest.h b/Framework/RemoteAlgorithms/test/UploadRemoteFileTest.h index 9aaf1ac4cff..1801ad928e0 100644 --- a/Framework/RemoteAlgorithms/test/UploadRemoteFileTest.h +++ b/Framework/RemoteAlgorithms/test/UploadRemoteFileTest.h @@ -124,7 +124,7 @@ public: const Mantid::Kernel::FacilityInfo &prevFac = Mantid::Kernel::ConfigService::Instance().getFacility(); - for (auto & testFacility : testFacilities) { + for (auto &testFacility : testFacilities) { const std::string facName = testFacility.first; const std::string compName = testFacility.second; diff --git a/Framework/SINQ/test/PoldiFitPeaks1D2Test.h b/Framework/SINQ/test/PoldiFitPeaks1D2Test.h index 1b89f3a932e..9fd47f6fd0c 100644 --- a/Framework/SINQ/test/PoldiFitPeaks1D2Test.h +++ b/Framework/SINQ/test/PoldiFitPeaks1D2Test.h @@ -100,7 +100,7 @@ public: std::vector<Property *> properties = fitPeaks1D.getProperties(); std::unordered_set<std::string> names; - for (auto & property : properties) { + for (auto &property : properties) { names.insert(property->name()); } diff --git a/Framework/SINQ/test/PoldiFitPeaks1DTest.h b/Framework/SINQ/test/PoldiFitPeaks1DTest.h index a58aad85ea0..e8ff092bb0c 100644 --- a/Framework/SINQ/test/PoldiFitPeaks1DTest.h +++ b/Framework/SINQ/test/PoldiFitPeaks1DTest.h @@ -102,7 +102,7 @@ public: std::vector<Property *> properties = fitPeaks1D.getProperties(); std::unordered_set<std::string> names; - for (auto & property : properties) { + for (auto &property : properties) { names.insert(property->name()); } diff --git a/Framework/SINQ/test/PoldiIndexKnownCompoundsTest.h b/Framework/SINQ/test/PoldiIndexKnownCompoundsTest.h index 053f06a7d7c..302ef9bc829 100644 --- a/Framework/SINQ/test/PoldiIndexKnownCompoundsTest.h +++ b/Framework/SINQ/test/PoldiIndexKnownCompoundsTest.h @@ -669,7 +669,7 @@ private: } void storeRandomWorkspaces(const std::vector<std::string> &wsNames) { - for (const auto & wsName : wsNames) { + for (const auto &wsName : wsNames) { WorkspaceCreationHelper::storeWS( wsName, WorkspaceCreationHelper::create1DWorkspaceRand(10, true)); } @@ -684,7 +684,7 @@ private: } void removeRandomWorkspaces(const std::vector<std::string> &wsNames) { - for (const auto & wsName : wsNames) { + for (const auto &wsName : wsNames) { WorkspaceCreationHelper::removeWS(wsName); } } diff --git a/Framework/SINQ/test/PoldiPeakSearchTest.h b/Framework/SINQ/test/PoldiPeakSearchTest.h index 4b670f6df36..b4534d07500 100644 --- a/Framework/SINQ/test/PoldiPeakSearchTest.h +++ b/Framework/SINQ/test/PoldiPeakSearchTest.h @@ -123,7 +123,7 @@ public: std::vector<double> testXData(testYData.size()); double x = 0.0; - for (double & iterX : testXData) { + for (double &iterX : testXData) { x += 1.0; iterX = x; } diff --git a/Framework/ScriptRepository/test/ScriptRepositoryTestImpl.h b/Framework/ScriptRepository/test/ScriptRepositoryTestImpl.h index ee1de6b4997..d8fe26e372d 100644 --- a/Framework/ScriptRepository/test/ScriptRepositoryTestImpl.h +++ b/Framework/ScriptRepository/test/ScriptRepositoryTestImpl.h @@ -363,7 +363,7 @@ public: TS_ASSERT_THROWS_NOTHING(list_files = repo->listFiles()); TS_ASSERT(list_files.size() == 5); // check that all the files at the central repository are inside - for (auto & test_entry : test_entries) + for (auto &test_entry : test_entries) TSM_ASSERT_THROWS_NOTHING(test_entry, repo->info(test_entry)); } @@ -478,7 +478,7 @@ public: TS_ASSERT_THROWS_NOTHING(list_of_files = repo->listFiles()); std::cout << "After update, the files are: "; - for (auto & list_of_file : list_of_files) { + for (auto &list_of_file : list_of_files) { std::cout << list_of_file << ", "; } std::cout << '\n'; -- GitLab