Commit f04f58dd authored by Tom Perkins's avatar Tom Perkins
Browse files

Clang-format patch re #15289

parent bdce1bfe
......@@ -58,8 +58,8 @@ private:
DataObjects::EventWorkspace_sptr
m_buffer; ///< Used to buffer events between calls to extractData()
Kernel::PseudoRandomNumberGenerator
*m_rand; ///< Used in generation of random events
Kernel::PseudoRandomNumberGenerator *
m_rand; ///< Used in generation of random events
Poco::Timer
m_timer; ///< Used to call the event-generating function on a schedule
int m_datarate; ///< The data rate to (attempt to) generate in events/sec
......
......@@ -282,8 +282,8 @@ void ISISLiveEventDataListener::run() {
saveEvents(events.data, pulseTime, events.head_n.period);
}
} catch (std::runtime_error
&e) { // exception handler for generic runtime exceptions
} catch (std::runtime_error &
e) { // exception handler for generic runtime exceptions
g_log.error() << "Caught a runtime exception." << std::endl
<< "Exception message: " << e.what() << std::endl;
......@@ -291,9 +291,9 @@ void ISISLiveEventDataListener::run() {
m_backgroundException = boost::make_shared<std::runtime_error>(e);
} catch (std::invalid_argument
&e) { // TimeSeriesProperty (and possibly some other things) can
// can throw these errors
} catch (std::invalid_argument &
e) { // TimeSeriesProperty (and possibly some other things) can
// can throw these errors
g_log.error() << "Caught an invalid argument exception." << std::endl
<< "Exception message: " << e.what() << std::endl;
m_isConnected = false;
......@@ -304,8 +304,7 @@ void ISISLiveEventDataListener::run() {
} catch (...) { // Default exception handler
g_log.error() << "Uncaught exception in ISISLiveEventDataListener network "
"read thread."
<< std::endl;
"read thread." << std::endl;
m_isConnected = false;
m_backgroundException = boost::shared_ptr<std::runtime_error>(
new std::runtime_error("Unknown error in backgound thread"));
......
......@@ -57,8 +57,9 @@ insertDataSources(const std::string &data_sources,
bool fileExists(const std::string &filename);
/// Pad vector of parameters to given length
extern void MANTID_MDALGORITHMS_DLL padParameterVector(
std::vector<double> &param_vector, const size_t grow_to_size);
extern void MANTID_MDALGORITHMS_DLL
padParameterVector(std::vector<double> &param_vector,
const size_t grow_to_size);
/** AccumulateMD : Algorithm for appending new data to a MDHistoWorkspace
......
......@@ -230,7 +230,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
}
for (i = 0;
i < static_cast<int>(sizeof(mex_functions) / sizeof(mexfunc_s_t)) &&
!func_called;
!func_called;
i++) {
if ((mex_functions[i].name != NULL) &&
!compare_nocase(funcname, mex_functions[i].name)) {
......@@ -689,8 +689,7 @@ void CreateSimpleAPIHelper(const std::string &algName,
// The function definition
mfile << "if nargin < " << (orderedProperties.size() - iOpt) << "\n"
<< "\tfprintf('All mandatory arguments have not been supplied, type "
"\"help "
<< algName << "\" for more information\\n');\n"
"\"help " << algName << "\" for more information\\n');\n"
<< "\treturn\n"
<< "end\n";
......
......@@ -132,50 +132,50 @@ void export_Projection() {
.def("setType", &setUnit, (arg("self"), arg("dimension"), arg("unit")),
"Sets the unit for the given dimension")
.add_property(
"u", make_function(
&Projection::U, return_internal_reference<>(),
boost::mpl::vector2<Mantid::Kernel::V3D &, Projection &>()),
make_function(
boost::bind(&Projection::setAxis, _1, 0, _2),
default_call_policies(),
boost::mpl::vector3<void, Projection &, Mantid::Kernel::V3D>()))
"u", make_function(
&Projection::U, return_internal_reference<>(),
boost::mpl::vector2<Mantid::Kernel::V3D &, Projection &>()),
make_function(
boost::bind(&Projection::setAxis, _1, 0, _2),
default_call_policies(),
boost::mpl::vector3<void, Projection &, Mantid::Kernel::V3D>()))
.add_property(
"v", make_function(
&Projection::V, return_internal_reference<>(),
boost::mpl::vector2<Mantid::Kernel::V3D &, Projection &>()),
make_function(
boost::bind(&Projection::setAxis, _1, 1, _2),
default_call_policies(),
boost::mpl::vector3<void, Projection &, Mantid::Kernel::V3D>()))
"v", make_function(
&Projection::V, return_internal_reference<>(),
boost::mpl::vector2<Mantid::Kernel::V3D &, Projection &>()),
make_function(
boost::bind(&Projection::setAxis, _1, 1, _2),
default_call_policies(),
boost::mpl::vector3<void, Projection &, Mantid::Kernel::V3D>()))
.add_property(
"w", make_function(
&Projection::W, return_internal_reference<>(),
boost::mpl::vector2<Mantid::Kernel::V3D &, Projection &>()),
make_function(
boost::bind(&Projection::setAxis, _1, 2, _2),
default_call_policies(),
boost::mpl::vector3<void, Projection &, Mantid::Kernel::V3D>()))
"w", make_function(
&Projection::W, return_internal_reference<>(),
boost::mpl::vector2<Mantid::Kernel::V3D &, Projection &>()),
make_function(
boost::bind(&Projection::setAxis, _1, 2, _2),
default_call_policies(),
boost::mpl::vector3<void, Projection &, Mantid::Kernel::V3D>()))
.add_property(
"u", make_function(
&Projection::U, return_internal_reference<>(),
boost::mpl::vector2<Mantid::Kernel::V3D &, Projection &>()),
make_function(
boost::bind(&projSetAxis, _1, 0, _2), default_call_policies(),
boost::mpl::vector3<void, Projection &, const object &>()))
"u", make_function(
&Projection::U, return_internal_reference<>(),
boost::mpl::vector2<Mantid::Kernel::V3D &, Projection &>()),
make_function(
boost::bind(&projSetAxis, _1, 0, _2), default_call_policies(),
boost::mpl::vector3<void, Projection &, const object &>()))
.add_property(
"v", make_function(
&Projection::V, return_internal_reference<>(),
boost::mpl::vector2<Mantid::Kernel::V3D &, Projection &>()),
make_function(
boost::bind(&projSetAxis, _1, 1, _2), default_call_policies(),
boost::mpl::vector3<void, Projection &, const object &>()))
"v", make_function(
&Projection::V, return_internal_reference<>(),
boost::mpl::vector2<Mantid::Kernel::V3D &, Projection &>()),
make_function(
boost::bind(&projSetAxis, _1, 1, _2), default_call_policies(),
boost::mpl::vector3<void, Projection &, const object &>()))
.add_property(
"w", make_function(
&Projection::W, return_internal_reference<>(),
boost::mpl::vector2<Mantid::Kernel::V3D &, Projection &>()),
make_function(
boost::bind(&projSetAxis, _1, 2, _2), default_call_policies(),
boost::mpl::vector3<void, Projection &, const object &>()))
"w", make_function(
&Projection::W, return_internal_reference<>(),
boost::mpl::vector2<Mantid::Kernel::V3D &, Projection &>()),
make_function(
boost::bind(&projSetAxis, _1, 2, _2), default_call_policies(),
boost::mpl::vector3<void, Projection &, const object &>()))
.def("createWorkspace", createWorkspace(),
"Create a TableWorkspace representing the projection");
}
......@@ -242,8 +242,7 @@ ScriptRepositoryImpl::ScriptRepositoryImpl(const std::string &local_rep,
if (!rep_json.exists()) {
g_log.error() << "Corrupted ScriptRepository at " << local_repository
<< ". Please, remove this folder, and install "
"ScriptRepository again"
<< std::endl;
"ScriptRepository again" << std::endl;
}
}
} catch (Poco::FileNotFoundException & /*ex*/) {
......@@ -360,8 +359,7 @@ void ScriptRepositoryImpl::ensureValidRepository() {
if (!isValid()) {
std::stringstream ss;
ss << "ScriptRepository is not installed correctly. The current path for "
"ScriptRepository is "
<< local_repository
"ScriptRepository is " << local_repository
<< " but some important files that are required are corrupted or not "
"present."
<< "\nPlease, re-install the ScriptRepository!\n"
......@@ -463,12 +461,11 @@ std::vector<std::string> ScriptRepositoryImpl::listFiles() {
// it will proceed in this situation.
} catch (Poco::Exception &ex) {
g_log.error() << "ScriptRepository failed to list all entries inside the "
"repository. Details: "
<< ex.className() << ":> " << ex.displayText() << std::endl;
"repository. Details: " << ex.className() << ":> "
<< ex.displayText() << std::endl;
} catch (std::exception &ex) {
g_log.error() << "ScriptRepository failed to list all entries inside the "
"repository. Details: "
<< ex.what() << std::endl;
"repository. Details: " << ex.what() << std::endl;
}
std::vector<std::string> out(repo.size());
size_t i = repo.size();
......
......@@ -446,8 +446,7 @@ void EQSANSLoad::exec() {
EventWorkspace_sptr inputEventWS = getProperty("InputWorkspace");
if (fileName.size() == 0 && !inputEventWS) {
g_log.error() << "EQSANSLoad input error: Either a valid file path or an "
"input workspace must be provided"
<< std::endl;
"input workspace must be provided" << std::endl;
throw std::runtime_error("EQSANSLoad input error: Either a valid file path "
"or an input workspace must be provided");
} else if (fileName.size() > 0 && inputEventWS) {
......@@ -688,8 +687,7 @@ void EQSANSLoad::exec() {
dataWS->mutableRun().addProperty("is_frame_skipping", 0, true);
if (correct_for_flight_path) {
g_log.error() << "CorrectForFlightPath and SkipTOFCorrection can't be "
"set to true at the same time"
<< std::endl;
"set to true at the same time" << std::endl;
m_output_message += " Skipped flight path correction: see error log\n";
}
} else {
......
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