From fde0fd04d85eb354ab1705f8578c36350bcc3831 Mon Sep 17 00:00:00 2001 From: Raquel Alvarez Banos Date: Thu, 23 Apr 2015 09:00:02 +0100 Subject: [PATCH] Re #6931 Pass first and last run by reference --- .../inc/MantidAlgorithms/PlotAsymmetryByLogValue.h | 2 +- .../Framework/Algorithms/src/PlotAsymmetryByLogValue.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PlotAsymmetryByLogValue.h b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PlotAsymmetryByLogValue.h index 73000a2b5f27..95c605f56cd3 100644 --- a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PlotAsymmetryByLogValue.h +++ b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PlotAsymmetryByLogValue.h @@ -101,7 +101,7 @@ class DLLExport PlotAsymmetryByLogValue : public API::Algorithm { /// Populate output workspace with results void populateOutputWorkspace (API::MatrixWorkspace_sptr &outWS, int nplots); /// Check input properties - void checkProperties (); + void checkProperties (size_t &is, size_t &ie); /// Stores base name shared by all runs static std::string g_filenameBase; diff --git a/Code/Mantid/Framework/Algorithms/src/PlotAsymmetryByLogValue.cpp b/Code/Mantid/Framework/Algorithms/src/PlotAsymmetryByLogValue.cpp index 4415cd3f4856..0598cc25c742 100644 --- a/Code/Mantid/Framework/Algorithms/src/PlotAsymmetryByLogValue.cpp +++ b/Code/Mantid/Framework/Algorithms/src/PlotAsymmetryByLogValue.cpp @@ -182,7 +182,8 @@ void PlotAsymmetryByLogValue::exec() { // Check input properties to decide whether or not we can reuse previous // results, if any - checkProperties(); + size_t is, ie; + checkProperties(is,ie); Progress progress(this, 0, 1, ie - is + 2); @@ -221,7 +222,7 @@ void PlotAsymmetryByLogValue::exec() { /** Checks input properties and compares them to previous values */ -void PlotAsymmetryByLogValue::checkProperties () { +void PlotAsymmetryByLogValue::checkProperties (size_t &is, size_t &ie) { // If any of the following properties has a different value from the // previous call, we need to re-do all the computations, which means @@ -250,8 +251,8 @@ void PlotAsymmetryByLogValue::checkProperties () { std::string filenameBase, filenameExt; int filenameZeros; parseRunNames( firstFN, lastFN, filenameBase, filenameExt, filenameZeros); - size_t is = atoi(firstFN.c_str()); // starting run number - size_t ie = atoi(lastFN.c_str()); // last run number + is = atoi(firstFN.c_str()); // starting run number + ie = atoi(lastFN.c_str()); // last run number // Check if any property has changed if ( g_logName != logName ||