lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 6b93e91 11/12: Remove an unneeded auxiliary f


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 6b93e91 11/12: Remove an unneeded auxiliary function
Date: Tue, 22 May 2018 17:09:23 -0400 (EDT)

branch: master
commit 6b93e91d9ae71d74998c2f1cc42cd87a0823ba22
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Remove an unneeded auxiliary function
---
 wx_table_generator.cpp | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/wx_table_generator.cpp b/wx_table_generator.cpp
index f54a0a9..a255c3b 100644
--- a/wx_table_generator.cpp
+++ b/wx_table_generator.cpp
@@ -186,22 +186,6 @@ class wx_table_generator::column_info
     bool const is_elastic_;
 };
 
-namespace
-{
-
-/// Increase the first argument to the second one if it's smaller.
-
-template<typename T>
-void increase_to_if_smaller(T& first, T second)
-{
-    if(first < second)
-        {
-        first = second;
-        }
-}
-
-} // Unnamed namespace.
-
 wx_table_generator::wx_table_generator
     (group_quote_style_tag                 // tag not referenced
     ,std::vector<column_parameters> const& vc
@@ -319,7 +303,7 @@ LMI_ASSERT(h / lh == int(1u + count_newlines(z.header)));
 LMI_ASSERT(std::size_t(h / lh) == 1u + count_newlines(z.header));
         // Store number of lines used by tallest unhidden header:
         // output_headers() uses it to write all headers as a block.
-        increase_to_if_smaller(max_header_lines_, std::size_t(h / lh));
+        max_header_lines_ = std::max(max_header_lines_, std::size_t(h / lh));
 
         switch(z.elasticity)
             {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]