From d0b901f27d8e009b720b247fb7780ba9bd355549 Mon Sep 17 00:00:00 2001
From: Thomas Fischer <thomas.fischer@ufz.de>
Date: Thu, 16 Apr 2020 09:20:21 +0200
Subject: [PATCH] [GL] Fix google-readability-braces-around-statements.

---
 GeoLib/Grid.h                          |  4 +++-
 GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp | 10 ++++++++--
 GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp |  6 ++++++
 GeoLib/PointVec.cpp                    |  2 ++
 GeoLib/Polyline.cpp                    |  2 ++
 GeoLib/SensorData.cpp                  |  4 +++-
 6 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/GeoLib/Grid.h b/GeoLib/Grid.h
index 8266d9efcae..8e0120b9898 100644
--- a/GeoLib/Grid.h
+++ b/GeoLib/Grid.h
@@ -200,8 +200,10 @@ Grid<POINT>::Grid(InputIterator first, InputIterator last,
                                     _max_pnt[2] - _min_pnt[2]}};
 
     // enlarge delta
-    for (auto & d : delta)
+    for (auto& d : delta)
+    {
         d = std::nextafter(d, std::numeric_limits<double>::max());
+    }
 
     assert(n_pnts > 0);
     initNumberOfSteps(max_num_per_grid_cell, static_cast<std::size_t>(n_pnts), delta);
diff --git a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp
index bf16c1ab19d..a60c76464c1 100644
--- a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp
+++ b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp
@@ -431,12 +431,15 @@ bool XmlGmlInterface::write()
                 }
             }
             else
+            {
                 INFO("XmlGmlInterface::write(): Polyline vector is empty, no polylines written to file.");
+            }
         }
     }
     else
+    {
         INFO("XmlGmlInterface::write(): Polyline vector is empty, no polylines written to file.");
-
+    }
 
     // SURFACES
     const GeoLib::SurfaceVec* sfc_vec (_geo_objs.getSurfaceVecObj(_exportName));
@@ -478,12 +481,15 @@ bool XmlGmlInterface::write()
                 }
             }
             else
+            {
                 INFO("XmlGmlInterface::write(): Surface vector is empty, no surfaces written to file.");
+            }
         }
     }
     else
+    {
         INFO("XmlGmlInterface::write(): Surface vector is empty, no surfaces written to file.");
-
+    }
 
     std::string xml = doc.toString().toStdString();
     _out << xml;
diff --git a/GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp b/GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp
index ff493674190..fbb61d358df 100644
--- a/GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp
+++ b/GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp
@@ -177,7 +177,9 @@ void XmlStnInterface::readStations( const QDomNode &stationsRoot,
             }
         }
         else
+        {
             WARN("XmlStnInterface::readStations(): Attribute missing in <station> tag.");
+        }
         station = station.nextSiblingElement();
     }
 }
@@ -216,13 +218,17 @@ void XmlStnInterface::readStratigraphy( const QDomNode &stratRoot,
                 depth_check = depth;
             }
             else
+            {
                 WARN(
                     "XmlStnInterface::readStratigraphy(): Skipped layer '{:s}' "
                     "in borehole '{:s}' because of thickness 0.0.",
                     horizonName, borehole->getName());
+            }
         }
         else
+        {
             WARN("XmlStnInterface::readStratigraphy(): Attribute missing in <horizon> tag.");
+        }
         horizon = horizon.nextSiblingElement();
     }
 }
diff --git a/GeoLib/PointVec.cpp b/GeoLib/PointVec.cpp
index f1292ff47f2..3608426263b 100644
--- a/GeoLib/PointVec.cpp
+++ b/GeoLib/PointVec.cpp
@@ -111,8 +111,10 @@ PointVec::PointVec(
     }
 
     if (number_of_all_input_pnts > _data_vec->size())
+    {
         WARN("PointVec::PointVec(): there are {:d} double points.",
              number_of_all_input_pnts - _data_vec->size());
+    }
 
     correctNameIDMapping();
     // create the inverse mapping
diff --git a/GeoLib/Polyline.cpp b/GeoLib/Polyline.cpp
index f8976916064..3522fa12dc8 100644
--- a/GeoLib/Polyline.cpp
+++ b/GeoLib/Polyline.cpp
@@ -378,7 +378,9 @@ Polyline* Polyline::constructPolylineFromSegments(const std::vector<Polyline*> &
                 }
             }
             else
+            {
                 ERR("Error in Polyline::contructPolylineFromSegments() - Line segments use different point vectors.");
+            }
         }
 
         if (!ply_found)
diff --git a/GeoLib/SensorData.cpp b/GeoLib/SensorData.cpp
index 4cf64928fb4..d39e280bc79 100644
--- a/GeoLib/SensorData.cpp
+++ b/GeoLib/SensorData.cpp
@@ -33,8 +33,10 @@ SensorData::SensorData(std::vector<std::size_t> time_steps)
 {
     for (std::size_t i=1; i<time_steps.size(); i++)
     {
-        if (time_steps[i-1]>=time_steps[i])
+        if (time_steps[i - 1] >= time_steps[i])
+        {
             ERR("Error in SensorData() - Time series has no order!");
+        }
     }
 }
 
-- 
GitLab