From 5a3716ca3f1b4c63c2b4b6e44d6e9eb6154c4733 Mon Sep 17 00:00:00 2001
From: Jose Borreguero <borreguero@gmail.com>
Date: Wed, 15 Feb 2017 18:56:55 -0500
Subject: [PATCH] Refs #18879 Comply with Clang format

---
 Framework/API/inc/MantidAPI/MuParserUtils.h            |  5 +++--
 Framework/API/src/MuParserUtils.cpp                    |  6 ++----
 Framework/API/test/MuParserUtilsTest.h                 |  1 -
 .../inc/MantidCurveFitting/Functions/UserFunction.h    | 10 +++++-----
 Framework/CurveFitting/src/Functions/UserFunction.cpp  |  2 +-
 MantidQt/MantidWidgets/src/UserFunctionDialog.cpp      |  3 ++-
 6 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/Framework/API/inc/MantidAPI/MuParserUtils.h b/Framework/API/inc/MantidAPI/MuParserUtils.h
index eda2de76bf2..dd075d7598b 100644
--- a/Framework/API/inc/MantidAPI/MuParserUtils.h
+++ b/Framework/API/inc/MantidAPI/MuParserUtils.h
@@ -42,8 +42,9 @@ extern const MANTID_API_DLL std::map<double, std::string> MUPARSER_CONSTANTS;
 /// Add a set of default constants to a muParser.
 void MANTID_API_DLL addDefaultConstants(mu::Parser &parser);
 
-typedef double(*oneVarFun)(double);  // pointer to a function of one variable
-extern const MANTID_API_DLL std::map<std::string, oneVarFun> MUPARSER_ONEVAR_FUNCTIONS;
+typedef double (*oneVarFun)(double); // pointer to a function of one variable
+extern const MANTID_API_DLL std::map<std::string, oneVarFun>
+    MUPARSER_ONEVAR_FUNCTIONS;
 
 void MANTID_API_DLL extraOneVarFunctions(mu::Parser &parser);
 
diff --git a/Framework/API/src/MuParserUtils.cpp b/Framework/API/src/MuParserUtils.cpp
index 47fc6ea4642..fe565759924 100644
--- a/Framework/API/src/MuParserUtils.cpp
+++ b/Framework/API/src/MuParserUtils.cpp
@@ -41,11 +41,9 @@ void DLLExport addDefaultConstants(mu::Parser &parser) {
   }
 }
 
-typedef double(*oneVarFun)(double);  // pointer to a function of one variable
+typedef double (*oneVarFun)(double); // pointer to a function of one variable
 const std::map<std::string, oneVarFun> MUPARSER_ONEVAR_FUNCTIONS = {
-  {"erf", gsl_sf_erf},
-  {"erfc", gsl_sf_erfc}
-};
+    {"erf", gsl_sf_erf}, {"erfc", gsl_sf_erfc}};
 
 void DLLExport extraOneVarFunctions(mu::Parser &parser) {
   for (const auto function : MUPARSER_ONEVAR_FUNCTIONS) {
diff --git a/Framework/API/test/MuParserUtilsTest.h b/Framework/API/test/MuParserUtilsTest.h
index c8f0bc74aa1..5a03f49edf7 100644
--- a/Framework/API/test/MuParserUtilsTest.h
+++ b/Framework/API/test/MuParserUtilsTest.h
@@ -21,7 +21,6 @@ public:
   }
 
 private:
-
   static bool extraOneVarFunctionsDefined(const mu::Parser &parser) {
     const auto functionMap = parser.GetFunDef();
     for (const auto pair : MuParserUtils::MUPARSER_CONSTANTS) {
diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/UserFunction.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/UserFunction.h
index a078f65fc4c..df17b444b72 100644
--- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/UserFunction.h
+++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/UserFunction.h
@@ -9,13 +9,13 @@
 #include <boost/shared_array.hpp>
 
 namespace Mantid {
-  namespace Kernel {
-    class MuParserExtd;
-  }
+namespace Kernel {
+class MuParserExtd;
+}
 }
 
 namespace mu {
-  class Parser;
+class Parser;
 }
 
 namespace Mantid {
@@ -90,7 +90,7 @@ private:
   /// The formula
   std::string m_formula;
   /// extended muParser instance
-  //Mantid::Kernel::MuParserExtd *m_parser;
+  // Mantid::Kernel::MuParserExtd *m_parser;
   mu::Parser *m_parser;
   /// Used as 'x' variable in m_parser.
   mutable double m_x;
diff --git a/Framework/CurveFitting/src/Functions/UserFunction.cpp b/Framework/CurveFitting/src/Functions/UserFunction.cpp
index c741fee3426..1062456d6fd 100644
--- a/Framework/CurveFitting/src/Functions/UserFunction.cpp
+++ b/Framework/CurveFitting/src/Functions/UserFunction.cpp
@@ -68,7 +68,7 @@ void UserFunction::setAttribute(const std::string &attName,
   clearAllParameters();
 
   try {
-    //Mantid::Kernel::MuParserExtd tmp_parser;
+    // Mantid::Kernel::MuParserExtd tmp_parser;
     mu::Parser tmp_parser;
     extraOneVarFunctions(tmp_parser);
     tmp_parser.SetVarFactory(AddVariable, this);
diff --git a/MantidQt/MantidWidgets/src/UserFunctionDialog.cpp b/MantidQt/MantidWidgets/src/UserFunctionDialog.cpp
index 62299eb210b..ceadf692863 100644
--- a/MantidQt/MantidWidgets/src/UserFunctionDialog.cpp
+++ b/MantidQt/MantidWidgets/src/UserFunctionDialog.cpp
@@ -81,7 +81,8 @@ void UserFunctionDialog::loadFunctions() {
   setFunction("Base", "sign", "sign(x)", "Sign of x");
   setFunction("Base", "rint", "rint(x)", "Round to nearest integer");
   setFunction("Base", "erf", "erf(x)", "error function of x");
-  setFunction("Base", "erfc", "erfc(x)", "Complementary error function erfc(x) = 1 - erf(x)");
+  setFunction("Base", "erfc", "erfc(x)",
+              "Complementary error function erfc(x) = 1 - erf(x)");
   setFunction("Built-in", "Gauss", "h*exp(-s*(x-c)^2)");
   setFunction("Built-in", "ExpDecay", "h*exp(-x/t)");
   QFile funFile(
-- 
GitLab