From 601f01d30bbc1127e5d981ab78cf4231099bfb2f Mon Sep 17 00:00:00 2001 From: Nick Draper <nick.draper@stfc.ac.uk> Date: Tue, 13 Oct 2015 13:37:23 +0100 Subject: [PATCH] clang format patch and a rh6 error re #13938 --- Framework/API/src/ExperimentInfo.cpp | 2 +- Framework/API/src/WorkspaceOpOverloads.cpp | 8 ++++---- Framework/Algorithms/src/CorelliCrossCorrelate.cpp | 7 +++---- Framework/CurveFitting/src/Algorithms/LeBailFit.cpp | 2 +- Framework/DataObjects/src/EventList.cpp | 2 +- Framework/MDAlgorithms/src/FindPeaksMD.cpp | 4 ++-- 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Framework/API/src/ExperimentInfo.cpp b/Framework/API/src/ExperimentInfo.cpp index 7f5f9dc9597..3ddd52bfdf0 100644 --- a/Framework/API/src/ExperimentInfo.cpp +++ b/Framework/API/src/ExperimentInfo.cpp @@ -1149,7 +1149,7 @@ void ExperimentInfo::readParameterMap(const std::string ¶meterStr) { // if( comp_name == prev_name ) continue; this blocks reading in different // parameters of the same component. RNT // prev_name = comp_name; - const Geometry::IComponent *comp = nullptr; + const Geometry::IComponent *comp = NULL; if (comp_name.find("detID:") != std::string::npos) { int detID = atoi(comp_name.substr(6).c_str()); comp = instr->getDetector(detID).get(); diff --git a/Framework/API/src/WorkspaceOpOverloads.cpp b/Framework/API/src/WorkspaceOpOverloads.cpp index b333686ed2b..f29bca1ca5f 100644 --- a/Framework/API/src/WorkspaceOpOverloads.cpp +++ b/Framework/API/src/WorkspaceOpOverloads.cpp @@ -76,9 +76,8 @@ ResultType executeBinaryOperation(const std::string &algorithmName, if (child) { return alg->getProperty("OutputWorkspace"); } else { - API::Workspace_sptr result = - API::AnalysisDataService::Instance().retrieve( - alg->getPropertyValue("OutputWorkspace")); + API::Workspace_sptr result = API::AnalysisDataService::Instance().retrieve( + alg->getPropertyValue("OutputWorkspace")); return boost::dynamic_pointer_cast<typename ResultType::element_type>( result); } @@ -511,7 +510,8 @@ bool WorkspaceHelpers::matchingBins(const MatrixWorkspace_const_sptr ws1, return false; } } else if (std::abs(firstWSLoop - secondWSLoop) / - std::max<double>(std::abs(firstWSLoop), std::abs(secondWSLoop)) > + std::max<double>(std::abs(firstWSLoop), + std::abs(secondWSLoop)) > 1.0E-7) return false; } diff --git a/Framework/Algorithms/src/CorelliCrossCorrelate.cpp b/Framework/Algorithms/src/CorelliCrossCorrelate.cpp index d65a6070081..8a499988135 100644 --- a/Framework/Algorithms/src/CorelliCrossCorrelate.cpp +++ b/Framework/Algorithms/src/CorelliCrossCorrelate.cpp @@ -168,11 +168,10 @@ void CorelliCrossCorrelate::exec() { // Determine period from chopper frequency. auto motorSpeed = dynamic_cast<TimeSeriesProperty<double> *>( inputWS->run().getProperty("BL9:Chop:Skf4:MotorSpeed")); - if (!motorSpeed) - { + if (!motorSpeed) { throw Exception::NotFoundError( - "Could not find a log value for the motor speed", - "BL9:Chop:Skf4:MotorSpeed"); + "Could not find a log value for the motor speed", + "BL9:Chop:Skf4:MotorSpeed"); } double period = 1e9 / static_cast<double>(motorSpeed->timeAverageValue()); g_log.information() << "Frequency = " << 1e9 / period diff --git a/Framework/CurveFitting/src/Algorithms/LeBailFit.cpp b/Framework/CurveFitting/src/Algorithms/LeBailFit.cpp index 2977bb77d42..21d6e9af3d6 100644 --- a/Framework/CurveFitting/src/Algorithms/LeBailFit.cpp +++ b/Framework/CurveFitting/src/Algorithms/LeBailFit.cpp @@ -341,7 +341,7 @@ void LeBailFit::exec() { case FIT: // LeBail Fit g_log.notice() << "Function: Do LeBail Fit ==> Monte Carlo.\n"; - //fall through + // fall through case MONTECARLO: // Monte carlo Le Bail refinement g_log.notice("Function: Do LeBail Fit By Monte Carlo Random Walk."); diff --git a/Framework/DataObjects/src/EventList.cpp b/Framework/DataObjects/src/EventList.cpp index 0afb9419bd2..8dfbd6d9421 100644 --- a/Framework/DataObjects/src/EventList.cpp +++ b/Framework/DataObjects/src/EventList.cpp @@ -528,7 +528,7 @@ EventList &EventList::operator-=(const EventList &more_events) { this->clearData(); return *this; } - + // We'll let the -= operator for the given vector of event lists handle it switch (this->getEventType()) { case TOF: diff --git a/Framework/MDAlgorithms/src/FindPeaksMD.cpp b/Framework/MDAlgorithms/src/FindPeaksMD.cpp index 988f5b7f297..ba70dd4bedd 100644 --- a/Framework/MDAlgorithms/src/FindPeaksMD.cpp +++ b/Framework/MDAlgorithms/src/FindPeaksMD.cpp @@ -221,9 +221,9 @@ FindPeaksMD::createPeak(const Mantid::Kernel::V3D &Q, const double binCount) { } else if (dimType == QSAMPLE) { // Build using the Q-sample-frame constructor p = boost::make_shared<Peak>(inst, Q, m_goniometer); - } else { + } else { throw std::invalid_argument( - "Cannot Integrate peaks unless the dimension is QLAB or QSAMPLE"); + "Cannot Integrate peaks unless the dimension is QLAB or QSAMPLE"); } try { // Look for a detector -- GitLab