From 5890eb66d3a59cc9b6472893c49857a3025d13c5 Mon Sep 17 00:00:00 2001 From: Steven Hahn <hahnse@ornl.gov> Date: Fri, 15 Jan 2016 18:10:47 -0500 Subject: [PATCH] Refs #14988. Fix linux compiler errors. --- Framework/Algorithms/src/IntegrateByComponent.cpp | 8 ++++---- Framework/MDAlgorithms/src/IntegrateMDHistoWorkspace.cpp | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Framework/Algorithms/src/IntegrateByComponent.cpp b/Framework/Algorithms/src/IntegrateByComponent.cpp index d1f3d629e57..83ba7abe591 100644 --- a/Framework/Algorithms/src/IntegrateByComponent.cpp +++ b/Framework/Algorithms/src/IntegrateByComponent.cpp @@ -85,19 +85,19 @@ void IntegrateByComponent::exec() { integratedWS->getInstrument(); PARALLEL_FOR1(integratedWS) - for (unsigned long hist : hists) { + for (int i = 0; i < static_cast<int>(hists.size()); ++i) { PARALLEL_START_INTERUPT_REGION const std::set<detid_t> &detids = - integratedWS->getSpectrum(hist) + integratedWS->getSpectrum(hists[i]) ->getDetectorIDs(); // should be only one detector per spectrum if (instrument->isDetectorMasked(detids)) continue; if (instrument->isMonitor(detids)) continue; - const double yValue = integratedWS->readY(hist)[0]; - const double eValue = integratedWS->readE(hist)[0]; + const double yValue = integratedWS->readY(hists[i])[0]; + const double eValue = integratedWS->readE(hists[i])[0]; if (boost::math::isnan(yValue) || boost::math::isinf(yValue) || boost::math::isnan(eValue) || diff --git a/Framework/MDAlgorithms/src/IntegrateMDHistoWorkspace.cpp b/Framework/MDAlgorithms/src/IntegrateMDHistoWorkspace.cpp index 44c0a3995e2..2a865f66636 100644 --- a/Framework/MDAlgorithms/src/IntegrateMDHistoWorkspace.cpp +++ b/Framework/MDAlgorithms/src/IntegrateMDHistoWorkspace.cpp @@ -355,11 +355,10 @@ void IntegrateMDHistoWorkspace::exec() { auto outIterators = outWS->createIterators(nThreads, NULL); PARALLEL_FOR_NO_WSP_CHECK() - for (auto &i : outIterators) { - + for (int i = 0; i < int(outIterators.size()); ++i) { PARALLEL_START_INTERUPT_REGION boost::scoped_ptr<MDHistoWorkspaceIterator> outIterator( - dynamic_cast<MDHistoWorkspaceIterator *>(i)); + dynamic_cast<MDHistoWorkspaceIterator *>(outIterators[i])); if (!outIterator) { throw std::logic_error( -- GitLab