From 8bdcd929a247534edfefd16a1899f2ec60b6b233 Mon Sep 17 00:00:00 2001
From: renchao_lu <renchao.lu@gmail.com>
Date: Mon, 14 Oct 2019 10:34:53 +0200
Subject: [PATCH] Clean up clang-tidy warning.

---
 ChemistryLib/PhreeqcIO.cpp                            | 2 ++
 ChemistryLib/PhreeqcIOData/CreateSurface.cpp          | 2 ++
 ChemistryLib/PhreeqcIOData/CreateUserPunch.cpp        | 2 ++
 ChemistryLib/PhreeqcIOData/Dump.h                     | 3 ++-
 ChemistryLib/PhreeqcIOData/UserPunch.cpp              | 2 ++
 ProcessLib/ComponentTransport/ComponentTransportFEM.h | 2 ++
 6 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/ChemistryLib/PhreeqcIO.cpp b/ChemistryLib/PhreeqcIO.cpp
index 7664ac36ea9..f5f11f26ef4 100644
--- a/ChemistryLib/PhreeqcIO.cpp
+++ b/ChemistryLib/PhreeqcIO.cpp
@@ -412,7 +412,9 @@ std::istream& operator>>(std::istream& in, PhreeqcIO& phreeqc_io)
     {
         // Skip equilibrium calculation result of initial solution
         for (int i = 0; i < num_skipped_lines; ++i)
+        {
             in.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
+        }
 
         // Get calculation result of the solution after the reaction
         if (!std::getline(in, line))
diff --git a/ChemistryLib/PhreeqcIOData/CreateSurface.cpp b/ChemistryLib/PhreeqcIOData/CreateSurface.cpp
index 258c862a346..5c173e998e1 100644
--- a/ChemistryLib/PhreeqcIOData/CreateSurface.cpp
+++ b/ChemistryLib/PhreeqcIOData/CreateSurface.cpp
@@ -20,7 +20,9 @@ std::vector<SurfaceSite> createSurface(
     boost::optional<BaseLib::ConfigTree> const& config)
 {
     if (!config)
+    {
         return {};
+    }
 
     std::vector<SurfaceSite> surface;
     for (auto const& site_config :
diff --git a/ChemistryLib/PhreeqcIOData/CreateUserPunch.cpp b/ChemistryLib/PhreeqcIOData/CreateUserPunch.cpp
index 9fd59e131da..fa1f5e70687 100644
--- a/ChemistryLib/PhreeqcIOData/CreateUserPunch.cpp
+++ b/ChemistryLib/PhreeqcIOData/CreateUserPunch.cpp
@@ -22,7 +22,9 @@ std::unique_ptr<UserPunch> createUserPunch(
     MeshLib::Mesh const& mesh)
 {
     if (!config)
+    {
         return nullptr;
+    }
 
     std::vector<SecondaryVariable> secondary_variables;
     for (auto const& variable_name :
diff --git a/ChemistryLib/PhreeqcIOData/Dump.h b/ChemistryLib/PhreeqcIOData/Dump.h
index 51165600c0a..eb364310f54 100644
--- a/ChemistryLib/PhreeqcIOData/Dump.h
+++ b/ChemistryLib/PhreeqcIOData/Dump.h
@@ -19,7 +19,8 @@ namespace PhreeqcIOData
 {
 struct Dump
 {
-    Dump(std::string project_file_name) : dump_file(project_file_name + ".dmp")
+    explicit Dump(std::string project_file_name)
+        : dump_file(project_file_name + ".dmp")
     {
     }
 
diff --git a/ChemistryLib/PhreeqcIOData/UserPunch.cpp b/ChemistryLib/PhreeqcIOData/UserPunch.cpp
index 07a4c736ba1..4cfe1777c12 100644
--- a/ChemistryLib/PhreeqcIOData/UserPunch.cpp
+++ b/ChemistryLib/PhreeqcIOData/UserPunch.cpp
@@ -20,7 +20,9 @@ std::ostream& operator<<(std::ostream& os, UserPunch const& user_punch)
     os << "-headings ";
     auto const& secondary_variables = user_punch.secondary_variables;
     for (auto& secondary_variable : secondary_variables)
+    {
         os << secondary_variable.name.c_str() << " ";
+    }
     os << "\n";
 
     os << "-start" << "\n";
diff --git a/ProcessLib/ComponentTransport/ComponentTransportFEM.h b/ProcessLib/ComponentTransport/ComponentTransportFEM.h
index 59d6f9df50e..671b8044da3 100644
--- a/ProcessLib/ComponentTransport/ComponentTransportFEM.h
+++ b/ProcessLib/ComponentTransport/ComponentTransportFEM.h
@@ -513,8 +513,10 @@ public:
                 w * dNdx.transpose() * density * K_over_mu * dNdx;
 
             if (_process_data.has_gravity)
+            {
                 local_b.noalias() +=
                     w * density * density * dNdx.transpose() * K_over_mu * b;
+            }
 
             // coupling term
             {
-- 
GitLab