Commit b0472cb8 authored by Raquel Alvarez Banos's avatar Raquel Alvarez Banos
Browse files

Re #11825 Progress should be a local variable

parent 8e43c2b5
...@@ -76,9 +76,6 @@ private: ...@@ -76,9 +76,6 @@ private:
/// Are we going to make a copy of the NeXus file to operate on ? /// Are we going to make a copy of the NeXus file to operate on ?
bool m_makeNexusCopy; bool m_makeNexusCopy;
/// Algorithm progress keeper
API::Progress *m_progress;
/// The workspace to load instrument and logs /// The workspace to load instrument and logs
API::MatrixWorkspace_sptr ws; API::MatrixWorkspace_sptr ws;
......
...@@ -24,7 +24,7 @@ DECLARE_ALGORITHM(AppendGeometryToSNSNexus) ...@@ -24,7 +24,7 @@ DECLARE_ALGORITHM(AppendGeometryToSNSNexus)
/** Constructor /** Constructor
*/ */
AppendGeometryToSNSNexus::AppendGeometryToSNSNexus() AppendGeometryToSNSNexus::AppendGeometryToSNSNexus()
: m_makeNexusCopy(false), m_progress(), m_instrumentLoadedCorrectly(false), : m_makeNexusCopy(false), m_instrumentLoadedCorrectly(false),
m_logsLoadedCorrectly(false) {} m_logsLoadedCorrectly(false) {}
//---------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------
...@@ -162,7 +162,7 @@ void AppendGeometryToSNSNexus::exec() { ...@@ -162,7 +162,7 @@ void AppendGeometryToSNSNexus::exec() {
// Get the number of histograms/detectors // Get the number of histograms/detectors
const size_t numDetectors = ws->getInstrument()->getDetectorIDs().size(); const size_t numDetectors = ws->getInstrument()->getDetectorIDs().size();
this->m_progress = new API::Progress(this, 0.0, 1.0, numDetectors); API::Progress progress(this, 0.0, 1.0, numDetectors);
// Get the instrument // Get the instrument
Geometry::Instrument_const_sptr instrument = ws->getInstrument(); Geometry::Instrument_const_sptr instrument = ws->getInstrument();
...@@ -252,7 +252,7 @@ void AppendGeometryToSNSNexus::exec() { ...@@ -252,7 +252,7 @@ void AppendGeometryToSNSNexus::exec() {
nxfile.closeGroup(); // close NXdetector nxfile.closeGroup(); // close NXdetector
this->m_progress->report(dets.size()); progress.report(dets.size());
} else { } else {
throw std::runtime_error( throw std::runtime_error(
"Could not find any detectors for the bank named " + "Could not find any detectors for the bank named " +
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment