From 62259a149e0043724db282217a36c0312cef649b Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de>
Date: Thu, 14 Jul 2016 11:54:59 +0200
Subject: [PATCH] manual editing (towards standardized #include order)

---
 Core/FormFactors/FormFactorPolyhedron.h       |  3 +--
 Core/Geometry/BasicVector3D.h                 |  3 ++-
 .../Samples/InterferenceFunction2DLattice.cpp | 24 +++++++++----------
 Core/Samples/InterferenceFunction2DLattice.h  | 17 +++++++------
 Core/Tools/OutputData.h                       | 11 ++++-----
 5 files changed, 28 insertions(+), 30 deletions(-)

diff --git a/Core/FormFactors/FormFactorPolyhedron.h b/Core/FormFactors/FormFactorPolyhedron.h
index 6c7d3ba408a..ec683043919 100644
--- a/Core/FormFactors/FormFactorPolyhedron.h
+++ b/Core/FormFactors/FormFactorPolyhedron.h
@@ -16,8 +16,7 @@
 #ifndef FORMFACTORPOLYHEDRON_H
 #define FORMFACTORPOLYHEDRON_H
 
-#include<memory>
-
+#include <memory>
 #include "IFormFactorBorn.h"
 
 class PolygonalTopology {
diff --git a/Core/Geometry/BasicVector3D.h b/Core/Geometry/BasicVector3D.h
index c8caa55a17f..793161a608d 100644
--- a/Core/Geometry/BasicVector3D.h
+++ b/Core/Geometry/BasicVector3D.h
@@ -20,10 +20,11 @@
 #ifndef BASICVECTOR3D_H
 #define BASICVECTOR3D_H
 
-static const double PI2 = 6.28318530717958647692528676655900577;
 #include "Exceptions.h"
 #include <complex>
 
+static const double PI2 = 6.28318530717958647692528676655900577;
+
 namespace Geometry {
 
 //! @class BasicVector3D
diff --git a/Core/Samples/InterferenceFunction2DLattice.cpp b/Core/Samples/InterferenceFunction2DLattice.cpp
index 313cb5c061f..cd594edb66d 100644
--- a/Core/Samples/InterferenceFunction2DLattice.cpp
+++ b/Core/Samples/InterferenceFunction2DLattice.cpp
@@ -13,14 +13,15 @@
 //
 // ************************************************************************** //
 
-#include "InterferenceFunction2DLattice.h"
-#include "BornAgainNamespace.h"
-
 #include "Macros.h"
+
 GCC_DIAG_OFF(unused-parameter)
 #include <boost/math/special_functions/round.hpp>
 GCC_DIAG_ON(unused-parameter)
 
+#include "InterferenceFunction2DLattice.h"
+#include "BornAgainNamespace.h"
+
 using namespace BornAgain;
 
 InterferenceFunction2DLattice::InterferenceFunction2DLattice(double length_1, double length_2,
@@ -41,20 +42,20 @@ InterferenceFunction2DLattice::~InterferenceFunction2DLattice()
     delete mp_pdf;
 }
 
-InterferenceFunction2DLattice *InterferenceFunction2DLattice::clone() const
+InterferenceFunction2DLattice* InterferenceFunction2DLattice::clone() const
 {
-    InterferenceFunction2DLattice *result = new InterferenceFunction2DLattice(m_lattice_params);
+    InterferenceFunction2DLattice* result = new InterferenceFunction2DLattice(m_lattice_params);
     if (mp_pdf)
         result->setDecayFunction(*mp_pdf);
     return result;
 }
 
-void InterferenceFunction2DLattice::accept(ISampleVisitor *visitor) const
+void InterferenceFunction2DLattice::accept(ISampleVisitor* visitor) const
 {
     visitor->visit(this);
 }
 
-InterferenceFunction2DLattice *InterferenceFunction2DLattice::createSquare(double lattice_length,
+InterferenceFunction2DLattice* InterferenceFunction2DLattice::createSquare(double lattice_length,
                                                                            double xi)
 {
     Lattice2DParameters lattice_params;
@@ -65,7 +66,7 @@ InterferenceFunction2DLattice *InterferenceFunction2DLattice::createSquare(doubl
     return new InterferenceFunction2DLattice(lattice_params);
 }
 
-InterferenceFunction2DLattice *InterferenceFunction2DLattice::createHexagonal(double lattice_length,
+InterferenceFunction2DLattice* InterferenceFunction2DLattice::createHexagonal(double lattice_length,
                                                                               double xi)
 {
     Lattice2DParameters lattice_params;
@@ -86,17 +87,16 @@ void InterferenceFunction2DLattice::setDecayFunction(const IFTDecayFunction2D &p
     initialize_calc_factors(omega_x, omega_y);
 }
 
-const IFTDecayFunction2D *InterferenceFunction2DLattice::getDecayFunction() const
+const IFTDecayFunction2D* InterferenceFunction2DLattice::getDecayFunction() const
 {
     return mp_pdf;
 }
 
 double InterferenceFunction2DLattice::evaluate(const kvector_t q) const
 {
-    if (!mp_pdf) {
+    if (!mp_pdf)
         throw Exceptions::NullPointerException("InterferenceFunction2DLattice::evaluate"
                                    " -> Error! No probability distribution function defined.");
-    }
     double result = 0.0;
     double qxr = q.x();
     double qyr = q.y();
@@ -119,7 +119,7 @@ Lattice2DParameters InterferenceFunction2DLattice::getLatticeParameters() const
 }
 
 std::string InterferenceFunction2DLattice::addParametersToExternalPool(
-        std::string path, ParameterPool *external_pool, int copy_number) const
+        std::string path, ParameterPool* external_pool, int copy_number) const
 {
     // add own parameters
     std::string  new_path = IParameterized::addParametersToExternalPool(
diff --git a/Core/Samples/InterferenceFunction2DLattice.h b/Core/Samples/InterferenceFunction2DLattice.h
index d932d13fcd9..16f746ba9d0 100644
--- a/Core/Samples/InterferenceFunction2DLattice.h
+++ b/Core/Samples/InterferenceFunction2DLattice.h
@@ -32,27 +32,26 @@ public:
     //! @param length_2 Lattice length 2
     //! @param angle angle between lattice vectors
     //! @param xi rotation of lattice with respect to x-axis
-    InterferenceFunction2DLattice(double length_1, double length_2,
-                                  double angle, double xi=0.0);
+    InterferenceFunction2DLattice(double length_1, double length_2, double angle, double xi=0.0);
     virtual ~InterferenceFunction2DLattice();
 
-    virtual InterferenceFunction2DLattice *clone() const;
+    virtual InterferenceFunction2DLattice* clone() const;
 
-    virtual void accept(ISampleVisitor *visitor) const;
+    virtual void accept(ISampleVisitor* visitor) const;
 
-    static InterferenceFunction2DLattice *createSquare(double lattice_length, double xi = 0.0);
-    static InterferenceFunction2DLattice *createHexagonal(double lattice_length, double xi = 0.0);
+    static InterferenceFunction2DLattice* createSquare(double lattice_length, double xi = 0.0);
+    static InterferenceFunction2DLattice* createHexagonal(double lattice_length, double xi = 0.0);
 
     void setDecayFunction(const IFTDecayFunction2D& pdf);
 
-    const IFTDecayFunction2D *getDecayFunction() const;
+    const IFTDecayFunction2D* getDecayFunction() const;
 
     virtual double evaluate(const kvector_t q) const;
 
     Lattice2DParameters getLatticeParameters() const;
 
     //! Adds parameters from local pool to external pool and recursively calls its direct children.
-    virtual std::string addParametersToExternalPool(std::string path, ParameterPool *external_pool,
+    virtual std::string addParametersToExternalPool(std::string path, ParameterPool* external_pool,
                                                     int copy_number = -1) const;
 
     //! Returns the particle density associated with this 2d lattice
@@ -72,7 +71,7 @@ protected:
             double& qx_frac, double& qy_frac) const;
 
     Lattice2DParameters m_lattice_params;
-    IFTDecayFunction2D *mp_pdf;
+    IFTDecayFunction2D* mp_pdf;
     static const int nmax = 20; //!< maximum value for qx*Lambdax and qy*lambday
 
 private:
diff --git a/Core/Tools/OutputData.h b/Core/Tools/OutputData.h
index 955367c6439..4ff53d121e8 100644
--- a/Core/Tools/OutputData.h
+++ b/Core/Tools/OutputData.h
@@ -16,6 +16,11 @@
 #ifndef OUTPUTDATA_H
 #define OUTPUTDATA_H
 
+#include "FixedBinAxis.h"
+#include "LLData.h"
+#include "OutputDataIterator.h"
+#include "SafePointerVector.h"
+
 #ifdef BORNAGAIN_PYTHON
 #ifndef PyObject_HEAD
 struct _object;
@@ -23,12 +28,6 @@ typedef _object PyObject;
 #endif
 #endif
 
-#include "FixedBinAxis.h"
-#include "LLData.h"
-#include "OutputDataIterator.h"
-#include "SafePointerVector.h"
-
-
 //! @class OutputData
 //! @ingroup tools
 //! @brief Template class to store data of any type in multi-dimensional space.
-- 
GitLab