Commit 64b959b2 authored by Mathieu Tillet's avatar Mathieu Tillet
Browse files

Merge branch 'master' into 31747_iview_event_rebin

parents 9b7440df 0817568b
# Yaml file format
Checks: >
*,
-abseil-*,-android-*,-altera-*,-fuchsia-*,-llvmlibc-*,-objc-*,
-google-build-using-namespace,
-google-readability-braces-around-statements,-hicpp-braces-around-statements,-readability-braces-around-statements,
-modernize-use-trailing-return-type,
-readability-implicit-bool-conversion
# Skip the following family of checks (for perf as we don't touch these libs at all):
# abseil-*
# android-*
# altera-*
# fuchsia-*
# llvmlibc-*
# objc-*
# The following checks are additionally disabled above:
# -google-build-using-namespace Useful for headers, but we can't filter out .cpp where it's used frequently
# -google-readability-braces-around-statements We use if blocks without braces throughout
# -readability-braces-around-statements Ditto
# -hicpp-braces-around-statements Ditto
# -modernize-use-trailing-return-type We use the old style throughout
# -readability-implicit-bool-conversion Allow if(!ptr) rather than (ptr==nullptr)
......@@ -106,7 +106,7 @@ build/
.builds
*.egg-info/
Framework/Kernel/inc/MantidKernel/GitHubApiHelper.h
qt/python/mantidqt/resources.py
qt/python/mantidqt/mantidqt/resources.py
qt/applications/workbench/workbench/app/resources.py
# Visual C++ cache files
......
......@@ -29,5 +29,5 @@ repos:
hooks:
- id: flake8
# Have to manually copy this from the .flake8 as flake8 will just ignore the config if the file is passed
exclude: Framework/PythonInterface/test|qt/applications/workbench/workbench/app/resources.py|qt/python/mantidqt/resources.py|qt/python/mantidqt/dialogs/errorreports/resources_qt4.py|qt/python/mantidqt/dialogs/errorreports/resources_qt5.py|Testing/PerformanceTests|Testing/SystemTests/lib|Testing/SystemTests/scripts|Testing/SystemTests/tests/framework/reference|scripts/ErrorReporter/ui_errorreport.py
exclude: Framework/PythonInterface/test|qt/applications/workbench/workbench/app/resources.py|qt/python/mantidqt/mantidqt/resources.py|qt/python/mantidqt/mantidqt/dialogs/errorreports/resources_qt4.py|qt/python/mantidqt/mantidqt/dialogs/errorreports/resources_qt5.py|Testing/PerformanceTests|Testing/SystemTests/lib|Testing/SystemTests/scripts|Testing/SystemTests/tests/framework/reference|scripts/ErrorReporter/ui_errorreport.py
args: ['--extend-ignore=E999,F821,E127']
......@@ -111,7 +111,7 @@ public:
class MANTID_API_DLL ProgressNotification : public AlgorithmNotification {
public:
/// Constructor
ProgressNotification(const Algorithm *const alg, double p, const std::string &msg, double estimatedTime,
ProgressNotification(const Algorithm *const alg, double p, std::string msg, double estimatedTime,
int progressPrecision);
std::string name() const override;
double progress; ///< Current progress. Value must be between 0 and 1.
......@@ -126,7 +126,7 @@ public:
class MANTID_API_DLL ErrorNotification : public AlgorithmNotification {
public:
/// Constructor
ErrorNotification(const Algorithm *const alg, const std::string &str);
ErrorNotification(const Algorithm *const alg, std::string str);
std::string name() const override;
std::string what; ///< message string
};
......@@ -171,8 +171,7 @@ public:
/// Function to return all of the seeAlso (these are not validated) algorithms
/// related to this algorithm.A default implementation is provided.
const std::vector<std::string> seeAlso() const override { return {}; };
/// function to return any aliases to the algorithm; A default implementation
/// is provided
/// function to return any aliases to the algorithm; A default implementation is provided
const std::string alias() const override { return ""; }
/// function to return URL for algorithm documentation; A default
......
......@@ -23,7 +23,7 @@ class IAlgorithm;
*/
class MANTID_API_DLL AlgorithmHasProperty : public Kernel::TypedValidator<std::shared_ptr<IAlgorithm>> {
public:
AlgorithmHasProperty(const std::string &propName);
AlgorithmHasProperty(std::string propName);
std::string getType() const;
Kernel::IValidator_sptr clone() const override;
......
......@@ -51,7 +51,7 @@ public:
~AlgorithmHistory();
AlgorithmHistory &operator=(const AlgorithmHistory &);
AlgorithmHistory(const AlgorithmHistory &);
AlgorithmHistory(const std::string &name, int vers, std::string uuid,
AlgorithmHistory(std::string name, int vers, std::string uuid,
const Types::Core::DateAndTime &start = Types::Core::DateAndTime::getCurrentTime(),
const double &duration = -1.0, std::size_t uexeccount = 0);
void addExecutionInfo(const Types::Core::DateAndTime &start, const double &duration);
......
......@@ -21,7 +21,7 @@ namespace API {
*/
class MANTID_API_DLL CatalogSession {
public:
CatalogSession(const std::string &sessionID, const std::string &facility, const std::string &endpoint);
CatalogSession(std::string sessionID, std::string facility, std::string endpoint);
std::string getSessionId() const;
void setSessionId(const std::string &sessionID);
const std::string &getSoapEndpoint() const;
......
......@@ -18,7 +18,7 @@ namespace API {
*/
class MANTID_API_DLL FileBackedExperimentInfo : public ExperimentInfo {
public:
FileBackedExperimentInfo(const std::string &filename, const std::string &nxpath);
FileBackedExperimentInfo(std::string filename, std::string nxpath);
ExperimentInfo *cloneExperimentInfo() const override;
private:
......
......@@ -44,7 +44,7 @@ public:
class MANTID_API_DLL GroupingLoader {
public:
explicit GroupingLoader(Geometry::Instrument_const_sptr instrument);
GroupingLoader(Geometry::Instrument_const_sptr instrument, const std::string &mainFieldDirection);
GroupingLoader(Geometry::Instrument_const_sptr instrument, std::string mainFieldDirection);
virtual ~GroupingLoader();
/// Load the grouping from the instrument's IDF
std::shared_ptr<Grouping> getGroupingFromIDF() const;
......
......@@ -41,7 +41,7 @@ public:
/// Type of domain to create.
enum DomainType { Simple = 0, Sequential, Parallel };
/// Constrcutor
IDomainCreator(Kernel::IPropertyManager *manager, const std::vector<std::string> &workspacePropertyNames,
IDomainCreator(Kernel::IPropertyManager *manager, std::vector<std::string> workspacePropertyNames,
DomainType domainType = Simple);
/// Virtual destructor
virtual ~IDomainCreator() = default;
......
......@@ -23,7 +23,7 @@ namespace API {
*/
class MANTID_API_DLL LatticeDomain : public FunctionDomain {
public:
LatticeDomain(const std::vector<Kernel::V3D> &hkls);
LatticeDomain(std::vector<Kernel::V3D> hkls);
size_t size() const override;
......
......@@ -18,7 +18,7 @@ namespace Mantid {
namespace API {
class MANTID_API_DLL MDFrameValidator : public Kernel::TypedValidator<IMDWorkspace_sptr> {
public:
explicit MDFrameValidator(const std::string &frameName);
explicit MDFrameValidator(std::string frameName);
/// Gets the type of the validator
std::string getType() const { return "mdframe"; }
/// Clone the current state
......
......@@ -34,7 +34,7 @@ public:
/// Constructor
MultiPeriodGroupWorker() = default;
/// Constructor
MultiPeriodGroupWorker(const std::string &workspacePropertyName);
MultiPeriodGroupWorker(std::string workspacePropertyName);
virtual ~MultiPeriodGroupWorker() = default;
/// Flag to indicate use of a custom workspace property
bool useCustomWorkspaceProperty() const;
......
......@@ -29,7 +29,7 @@ class MatrixWorkspace;
class MANTID_API_DLL NumericAxis : public Axis {
public:
NumericAxis(const std::size_t &length);
NumericAxis(const std::vector<double> &centres);
NumericAxis(std::vector<double> centres);
Axis *clone(const MatrixWorkspace *const parentWorkspace) override;
Axis *clone(const std::size_t length, const MatrixWorkspace *const parentWorkspace) override;
......
......@@ -111,7 +111,7 @@ private:
/// Calculate the average gonoimeter matrix
void calculateAverageGoniometerMatrix();
/// Calculate the gonoimeter matrices from logs
void calculateGoniometerMatrices(Geometry::Goniometer goniometer);
void calculateGoniometerMatrices(const Geometry::Goniometer &goniometer);
/// Goniometer for this run
std::vector<std::unique_ptr<Geometry::Goniometer>> m_goniometers;
......
......@@ -80,7 +80,8 @@ public:
private:
/// Recursive function to load the algorithm history tree from file
void loadNestedHistory(::NeXus::File *file, AlgorithmHistory_sptr parent = std::shared_ptr<AlgorithmHistory>());
void loadNestedHistory(::NeXus::File *file,
const AlgorithmHistory_sptr &parent = std::shared_ptr<AlgorithmHistory>());
/// Parse an algorithm history string loaded from file
AlgorithmHistory_sptr parseAlgorithmHistory(const std::string &rawData);
/// Find the history entries at this level in the file.
......
......@@ -17,7 +17,7 @@ namespace API {
*/
class MANTID_API_DLL WorkspaceUnitValidator : public MatrixWorkspaceValidator {
public:
explicit WorkspaceUnitValidator(const std::string &unitID = "");
explicit WorkspaceUnitValidator(std::string unitID = "");
/// Gets the type of the validator
std::string getType() const { return "workspaceunit"; }
/// Clone the current state
......
......@@ -11,8 +11,7 @@
#include <memory>
#include <sstream>
namespace Mantid {
namespace API {
namespace Mantid::API {
/// Default constructor. Sets up an empty list of valid values.
ADSValidator::ADSValidator(const bool allowMultiSelection, const bool isOptional)
......@@ -68,5 +67,4 @@ std::vector<std::string> ADSValidator::allowedValues() const {
return vals;
}
} // namespace API
} // namespace Mantid
} // namespace Mantid::API
......@@ -1879,15 +1879,15 @@ Algorithm::FinishedNotification::FinishedNotification(const Algorithm *const alg
: AlgorithmNotification(alg), success(res) {}
std::string Algorithm::FinishedNotification::name() const { return "FinishedNotification"; }
Algorithm::ProgressNotification::ProgressNotification(const Algorithm *const alg, double p, const std::string &msg,
Algorithm::ProgressNotification::ProgressNotification(const Algorithm *const alg, double p, std::string msg,
double estimatedTime, int progressPrecision)
: AlgorithmNotification(alg), progress(p), message(msg), estimatedTime(estimatedTime),
: AlgorithmNotification(alg), progress(p), message(std::move(msg)), estimatedTime(estimatedTime),
progressPrecision(progressPrecision) {}
std::string Algorithm::ProgressNotification::name() const { return "ProgressNotification"; }
Algorithm::ErrorNotification::ErrorNotification(const Algorithm *const alg, const std::string &str)
: AlgorithmNotification(alg), what(str) {}
Algorithm::ErrorNotification::ErrorNotification(const Algorithm *const alg, std::string str)
: AlgorithmNotification(alg), what(std::move(str)) {}
std::string Algorithm::ErrorNotification::name() const { return "ErrorNotification"; }
......
......@@ -6,8 +6,7 @@
// SPDX - License - Identifier: GPL - 3.0 +
#include "MantidAPI/Algorithm.h"
namespace Mantid {
namespace API {
namespace Mantid::API {
//---------------------------------------------------------------------------------------------
/** The actions to be performed by the algorithm on a dataset. This method is
* invoked for top level algorithms by the application manager.
......@@ -20,5 +19,4 @@ namespace API {
* @return true if executed successfully.
*/
bool Algorithm::execute() { return executeInternal(); }
} // namespace API
} // namespace Mantid
} // namespace Mantid::API
Markdown is supported
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