[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();
- [lmi-commits] [lmi] master updated (0c90de6 -> 45b086a), Greg Chicares, 2018/05/12
- [lmi-commits] [lmi] master 914ea72 02/13: Remove a "helper" lambda,
Greg Chicares <=
- [lmi-commits] [lmi] master 990dbe2 01/13: Improve encapsulation, Greg Chicares, 2018/05/12
- [lmi-commits] [lmi] master 0188828 07/13: Improve alignment, Greg Chicares, 2018/05/12
- [lmi-commits] [lmi] master be2f05a 09/13: Improve a variable's name, Greg Chicares, 2018/05/12
- [lmi-commits] [lmi] master e00fb75 05/13: Spell 'color' one way only, Greg Chicares, 2018/05/12
- [lmi-commits] [lmi] master cccd64c 04/13: Remove disused header, Greg Chicares, 2018/05/12
- [lmi-commits] [lmi] master 111f2bd 03/13: Correct a misleading comment, Greg Chicares, 2018/05/12
- [lmi-commits] [lmi] master 02c6f2e 12/13: Pass column data to table generator as an aggregate parameter, Greg Chicares, 2018/05/12
- [lmi-commits] [lmi] master 45b086a 13/13: Simplify logic, Greg Chicares, 2018/05/12
- [lmi-commits] [lmi] master 5c9a0db 08/13: Improve typography, Greg Chicares, 2018/05/12
- [lmi-commits] [lmi] master 8e0a46c 11/13: Regularize names, Greg Chicares, 2018/05/12