From 12f9c5e8b68aa81e9db5cc54f68c8c1b32f33612 Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <github@naumov.de>
Date: Wed, 23 Jun 2021 20:17:06 +0200
Subject: [PATCH] clang-format

---
 Applications/DataExplorer/DataView/GEOModels.cpp |  3 ++-
 Applications/DataExplorer/DataView/GEOModels.h   |  3 ++-
 GeoLib/EarClippingTriangulation.cpp              |  4 ++--
 GeoLib/EarClippingTriangulation.h                | 13 ++++++-------
 GeoLib/Polygon.h                                 |  3 ++-
 Tests/MeshGeoToolsLib/TestEarClipping.cpp        |  3 ++-
 6 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/Applications/DataExplorer/DataView/GEOModels.cpp b/Applications/DataExplorer/DataView/GEOModels.cpp
index d7580633d8d..b2aad13d52e 100644
--- a/Applications/DataExplorer/DataView/GEOModels.cpp
+++ b/Applications/DataExplorer/DataView/GEOModels.cpp
@@ -211,7 +211,8 @@ void GEOModels::connectPolylineSegments(
                     INFO(
                         "Creating a surface by triangulation of the polyline "
                         "...");
-                    if (GeoLib::Surface* sfc = FileIO::createSurfaceWithEarClipping(*new_line))
+                    if (GeoLib::Surface* sfc =
+                            FileIO::createSurfaceWithEarClipping(*new_line))
                     {
                         std::vector<GeoLib::Surface*> new_sfc;
                         new_sfc.push_back(sfc);
diff --git a/Applications/DataExplorer/DataView/GEOModels.h b/Applications/DataExplorer/DataView/GEOModels.h
index 84963c7ebc2..8f1a6fa8fb6 100644
--- a/Applications/DataExplorer/DataView/GEOModels.h
+++ b/Applications/DataExplorer/DataView/GEOModels.h
@@ -95,7 +95,8 @@ public slots:
                                  std::vector<std::size_t> const& indexlist,
                                  double const proximity,
                                  std::string const& ply_name,
-                                 bool const closePly, bool const triangulatePly);
+                                 bool const closePly,
+                                 bool const triangulatePly);
 
 protected:
     GeoTreeModel* _geoModel;
diff --git a/GeoLib/EarClippingTriangulation.cpp b/GeoLib/EarClippingTriangulation.cpp
index 5415521cb87..2cea68857a4 100644
--- a/GeoLib/EarClippingTriangulation.cpp
+++ b/GeoLib/EarClippingTriangulation.cpp
@@ -109,8 +109,8 @@ void EarClippingTriangulation::ensureCWOrientation()
     {
         _original_orientation =
             GeoLib::getOrientation(*_pnts[min_x_max_y_idx - 1],
-                                                  *_pnts[min_x_max_y_idx],
-                                                  *_pnts[min_x_max_y_idx + 1]);
+                                   *_pnts[min_x_max_y_idx],
+                                   *_pnts[min_x_max_y_idx + 1]);
     }
     else
     {
diff --git a/GeoLib/EarClippingTriangulation.h b/GeoLib/EarClippingTriangulation.h
index eac383b153b..bc79966b685 100644
--- a/GeoLib/EarClippingTriangulation.h
+++ b/GeoLib/EarClippingTriangulation.h
@@ -21,7 +21,6 @@
 
 namespace GeoLib
 {
-
 class Polygon;
 class Triangle;
 
@@ -29,7 +28,7 @@ class EarClippingTriangulation final
 {
 public:
     EarClippingTriangulation(GeoLib::Polygon const& polygon,
-                             std::list<GeoLib::Triangle> &triangles,
+                             std::list<GeoLib::Triangle>& triangles,
                              bool rot = true);
     ~EarClippingTriangulation();
 
@@ -38,13 +37,13 @@ private:
      * copies the points of the polygon to the vector _pnts
      */
     inline void copyPolygonPoints(GeoLib::Polygon const& polygon);
-    inline void ensureCWOrientation ();
+    inline void ensureCWOrientation();
 
     inline bool isEar(std::size_t v0, std::size_t v1, std::size_t v2) const;
 
-    inline void initVertexList ();
-    inline void initLists ();
-    inline void clipEars ();
+    inline void initVertexList();
+    inline void initLists();
+    inline void clipEars();
 
     /**
      * a copy of the polygon points
@@ -61,4 +60,4 @@ private:
 
     GeoLib::Orientation _original_orientation;
 };
-} // end namespace GeoLib
+}  // end namespace GeoLib
diff --git a/GeoLib/Polygon.h b/GeoLib/Polygon.h
index 09f4ad3bc8e..7d02a4a9873 100644
--- a/GeoLib/Polygon.h
+++ b/GeoLib/Polygon.h
@@ -100,7 +100,8 @@ public:
                                              GeoLib::Point& intersection_pnt,
                                              std::size_t& seg_num) const;
 
-    /// Subdivides a self-intersecting polygon into a list of non-intersecting shapes.
+    /// Subdivides a self-intersecting polygon into a list of non-intersecting
+    /// shapes.
     std::list<Polygon*> const& computeListOfSimplePolygons();
 
     friend bool operator==(Polygon const& lhs, Polygon const& rhs);
diff --git a/Tests/MeshGeoToolsLib/TestEarClipping.cpp b/Tests/MeshGeoToolsLib/TestEarClipping.cpp
index 01f9f023b1a..aaa7ba5d178 100644
--- a/Tests/MeshGeoToolsLib/TestEarClipping.cpp
+++ b/Tests/MeshGeoToolsLib/TestEarClipping.cpp
@@ -32,7 +32,8 @@ TEST(TestEarClipping, TestEarClippingPolygons)
     ASSERT_EQ(4, polygons.size());
     for (auto polygon : polygons)
     {
-        std::unique_ptr<GeoLib::Surface> sfc (FileIO::createSurfaceWithEarClipping(*polygon));
+        std::unique_ptr<GeoLib::Surface> sfc(
+            FileIO::createSurfaceWithEarClipping(*polygon));
         ASSERT_TRUE(sfc != nullptr);
         ASSERT_EQ(sfc->getNumberOfTriangles(),
                   polygon->getNumberOfPoints() - 3);
-- 
GitLab