From f41a7fc622d209159e914475cc2cfe972b1621e9 Mon Sep 17 00:00:00 2001 From: mantid-builder <mantid-buildserver@mantidproject.org> Date: Mon, 25 Jun 2018 13:06:24 +0100 Subject: [PATCH] clang-format PR22644 579154e --- .../kernel/PropertyWithValueExporter.h | 1 - .../kernel/src/Exports/ArrayProperty.cpp | 7 ++-- .../kernel/src/Exports/TimeSeriesProperty.cpp | 38 +++++++++---------- 3 files changed, 20 insertions(+), 26 deletions(-) diff --git a/Framework/PythonInterface/inc/MantidPythonInterface/kernel/PropertyWithValueExporter.h b/Framework/PythonInterface/inc/MantidPythonInterface/kernel/PropertyWithValueExporter.h index f1ebd9b71b7..0b094ee1bf5 100644 --- a/Framework/PythonInterface/inc/MantidPythonInterface/kernel/PropertyWithValueExporter.h +++ b/Framework/PythonInterface/inc/MantidPythonInterface/kernel/PropertyWithValueExporter.h @@ -61,7 +61,6 @@ struct PropertyWithValueExporter { .def("dtype", &dtype<HeldType>, arg("self"), "returns :`std::string`"); } }; - } } diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayProperty.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayProperty.cpp index e1e33e2e756..7060b6134e7 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayProperty.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayProperty.cpp @@ -25,12 +25,11 @@ using namespace boost::python; namespace { /// return_value_policy for cloned numpy array - using return_cloned_numpy = +using return_cloned_numpy = return_value_policy<Policies::VectorRefToNumpy<Converters::Clone>>; // Call the dtype helper function -template <typename type> -std::string dtype(ArrayProperty<type> &self) { +template <typename type> std::string dtype(ArrayProperty<type> &self) { return dtypeHelper::dtype(self); } @@ -107,7 +106,7 @@ ArrayProperty<T> *createArrayPropertyFromNDArray(const std::string &name, void export_ArrayProperty() { // Match the python names to their C types - EXPORT_ARRAY_PROP(double, Float); + EXPORT_ARRAY_PROP(double, Float); EXPORT_ARRAY_PROP(long, Int); EXPORT_ARRAY_PROP(std::string, String); diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/TimeSeriesProperty.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/TimeSeriesProperty.cpp index 0abdccb66f9..0ff9b3da4ec 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/TimeSeriesProperty.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/TimeSeriesProperty.cpp @@ -37,8 +37,7 @@ void addPyTimeValue(TimeSeriesProperty<TYPE> &self, } // Call the dtype helper function -template <typename TYPE> -std::string dtype(TimeSeriesProperty<TYPE> &self) { +template <typename TYPE> std::string dtype(TimeSeriesProperty<TYPE> &self) { return dtypeHelper::dtype(self); } @@ -50,24 +49,22 @@ std::string dtype(TimeSeriesProperty<TYPE> &self) { #Prefix "TimeSeriesProperty", \ init<const std::string &>((arg("self"), arg("value")))) \ .add_property( \ - "value", \ - make_function( \ - &Mantid::Kernel::TimeSeriesProperty<TYPE>::valuesAsVector, \ - return_value_policy<VectorToNumpy>())) \ + "value", \ + make_function( \ + &Mantid::Kernel::TimeSeriesProperty<TYPE>::valuesAsVector, \ + return_value_policy<VectorToNumpy>())) \ .add_property( \ - "times", \ - make_function( \ - &Mantid::Kernel::TimeSeriesProperty<TYPE>::timesAsVector, \ - return_value_policy<VectorToNumpy>())) \ - .def("addValue", \ - (void (TimeSeriesProperty<TYPE>::*)(const DateAndTime &, \ - const TYPE)) & \ - TimeSeriesProperty<TYPE>::addValue, \ + "times", \ + make_function( \ + &Mantid::Kernel::TimeSeriesProperty<TYPE>::timesAsVector, \ + return_value_policy<VectorToNumpy>())) \ + .def("addValue", (void (TimeSeriesProperty<TYPE>::*)( \ + const DateAndTime &, const TYPE)) & \ + TimeSeriesProperty<TYPE>::addValue, \ (arg("self"), arg("time"), arg("value"))) \ - .def("addValue", \ - (void (TimeSeriesProperty<TYPE>::*)(const std::string &, \ - const TYPE)) & \ - TimeSeriesProperty<TYPE>::addValue, \ + .def("addValue", (void (TimeSeriesProperty<TYPE>::*)( \ + const std::string &, const TYPE)) & \ + TimeSeriesProperty<TYPE>::addValue, \ (arg("self"), arg("time"), arg("value"))) \ .def("addValue", &addPyTimeValue<TYPE>, \ (arg("self"), arg("time"), arg("value"))) \ @@ -94,7 +91,6 @@ std::string dtype(TimeSeriesProperty<TYPE> &self) { } // namespace - void export_TimeSeriesProperty_Double() { EXPORT_TIMESERIES_PROP(double, Float); } @@ -124,8 +120,8 @@ void export_TimeSeriesPropertyStatistics() { .add_property("median", &Mantid::Kernel::TimeSeriesPropertyStatistics::median) .add_property( - "standard_deviation", - &Mantid::Kernel::TimeSeriesPropertyStatistics::standard_deviation) + "standard_deviation", + &Mantid::Kernel::TimeSeriesPropertyStatistics::standard_deviation) .add_property("duration", &Mantid::Kernel::TimeSeriesPropertyStatistics::duration); } -- GitLab