lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 914ea72 02/13: Remove a "helper" lambda


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 914ea72 02/13: Remove a "helper" lambda
Date: Sat, 12 May 2018 12:00:21 -0400 (EDT)

branch: master
commit 914ea72c33473230550414d296d23c429a9e6280
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Remove a "helper" lambda
    
    This commit can always be reverted if a lambda actually becomes helpful
    someday. Most likely, YAGNI.
---
 wx_table_generator.cpp | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/wx_table_generator.cpp b/wx_table_generator.cpp
index b9fb885..cb717b7 100644
--- a/wx_table_generator.cpp
+++ b/wx_table_generator.cpp
@@ -671,12 +671,6 @@ void wx_table_generator::do_output_values
                     }
                 }
 
-            // Tiny helper to avoid duplicating the same DrawText() call in
-            // both branches of the "if" statement below. It might not be that
-            // useful now, but could become so if this simple DrawText() gets
-            // more complicated in the future.
-            auto const do_output = [=]() { dc_.DrawText(s, x_text, y_text); };
-
             if(ci.needs_clipping())
                 {
                 // It is assumed that the width of the "Participant" column
@@ -694,12 +688,11 @@ void wx_table_generator::do_output_values
                         ,wxSize{ci.col_width() - column_margin(), row_height_}
                         }
                     );
-
-                do_output();
+                dc_.DrawText(s, x_text, y_text);
                 }
             else
                 {
-                do_output();
+                dc_.DrawText(s, x_text, y_text);
                 }
             }
         x += ci.col_width();



reply via email to

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