From ab630b4f64759862241fe41c34ea5aa36c814407 Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <github@naumov.de>
Date: Sun, 3 Mar 2019 14:08:07 +0100
Subject: [PATCH] Use transparent functor for less<> and greater<>.

clang-tidy modernize-use-transparent-functors check.
---
 BaseLib/ConfigTree.cpp                                         | 2 +-
 BaseLib/ConfigTree.h                                           | 3 +--
 .../Algorithms/CreateEvolutionaryPIDcontroller.cpp             | 2 +-
 ProcessLib/Output/CreateOutput.cpp                             | 2 +-
 4 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/BaseLib/ConfigTree.cpp b/BaseLib/ConfigTree.cpp
index 1cf8551998f..ea5f7ee38b0 100644
--- a/BaseLib/ConfigTree.cpp
+++ b/BaseLib/ConfigTree.cpp
@@ -18,7 +18,7 @@
 // Explicitly instantiate the boost::property_tree::ptree which is a typedef to
 // the following basic_ptree.
 template class boost::property_tree::basic_ptree<std::string, std::string,
-                                                 std::less<std::string>>;
+                                                 std::less<>>;
 
 //! Collects swallowed error messages raised by the check during destruction of
 //! ConfigTree instances.
diff --git a/BaseLib/ConfigTree.h b/BaseLib/ConfigTree.h
index b56d15010d2..97b5aa72621 100644
--- a/BaseLib/ConfigTree.h
+++ b/BaseLib/ConfigTree.h
@@ -20,8 +20,7 @@
 #include <boost/property_tree/ptree.hpp>
 
 extern template class boost::property_tree::basic_ptree<
-    std::string, std::string, std::less<std::string>>;
-
+    std::string, std::string, std::less<>>;
 
 namespace BaseLib
 {
diff --git a/NumLib/TimeStepping/Algorithms/CreateEvolutionaryPIDcontroller.cpp b/NumLib/TimeStepping/Algorithms/CreateEvolutionaryPIDcontroller.cpp
index cbb14a1c253..337a0b59cd0 100644
--- a/NumLib/TimeStepping/Algorithms/CreateEvolutionaryPIDcontroller.cpp
+++ b/NumLib/TimeStepping/Algorithms/CreateEvolutionaryPIDcontroller.cpp
@@ -49,7 +49,7 @@ std::unique_ptr<TimeStepAlgorithm> createEvolutionaryPIDcontroller(
     if (!fixed_output_times.empty())
     {
         // Remove possible duplicated elements and sort in descending order.
-        BaseLib::makeVectorUnique(fixed_output_times, std::greater<double>());
+        BaseLib::makeVectorUnique(fixed_output_times, std::greater<>());
     }
 
     //! \ogs_file_param{prj__time_loop__processes__process__time_stepping__EvolutionaryPIDcontroller__tol}
diff --git a/ProcessLib/Output/CreateOutput.cpp b/ProcessLib/Output/CreateOutput.cpp
index 98e60d790e4..70dd99c7415 100644
--- a/ProcessLib/Output/CreateOutput.cpp
+++ b/ProcessLib/Output/CreateOutput.cpp
@@ -124,7 +124,7 @@ std::unique_ptr<Output> createOutput(
     {
         fixed_output_times = std::move(*fixed_output_times_ptr);
         // Remove possible duplicated elements and sort in descending order.
-        BaseLib::makeVectorUnique(fixed_output_times, std::greater<double>());
+        BaseLib::makeVectorUnique(fixed_output_times, std::greater<>());
     }
 
     bool const output_iteration_results =
-- 
GitLab