[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 49d9408 4/4: Refactor for clarity
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 49d9408 4/4: Refactor for clarity |
Date: |
Wed, 8 Aug 2018 12:20:11 -0400 (EDT) |
branch: master
commit 49d9408cb40cf3b5146de71483e9871530143499
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Refactor for clarity
---
ledger_pdf_generator_wx.cpp | 68 ++++++++++++++++++++++-----------------------
1 file changed, 34 insertions(+), 34 deletions(-)
diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index 77c23af..4b28885 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -1477,29 +1477,29 @@ class numeric_summary_table_cell
: oe_shown
;
- std::string output_value;
- if(is_last_row && column_policy_year == j)
- {
- // Other rows are for given durations, but the
- // last row is for a given age (typically 70).
- std::ostringstream oss;
- oss << "Age " << age_last;
- output_value = oss.str();
- }
- else if(columns[j].variable_name.empty())
- {
- ; // Separator column: use empty string.
- }
- else
- {
- output_value = interpolate_html.evaluate
- (columns[j].variable_name
- ,year - 1
- );
- }
-
if(oe_shown == columns[j].visibility)
{
+ std::string output_value;
+ if(is_last_row && column_policy_year == j)
+ {
+ // Other rows are for given durations, but the
+ // last row is for a given age (typically 70).
+ std::ostringstream oss;
+ oss << "Age " << age_last;
+ output_value = oss.str();
+ }
+ else if(columns[j].variable_name.empty())
+ {
+ ; // Separator column: use empty string.
+ }
+ else
+ {
+ output_value = interpolate_html.evaluate
+ (columns[j].variable_name
+ ,year - 1
+ );
+ }
+
visible_values.push_back(output_value);
}
}
@@ -1624,21 +1624,21 @@ class page_with_tabular_report
: oe_shown
;
- std::string output_value;
- if(columns[j].variable_name.empty())
- {
- ; // Separator column: use empty string.
- }
- else
- {
- output_value = interpolate_html.evaluate
- (columns[j].variable_name
- ,year
- );
- }
-
if(oe_shown == columns[j].visibility)
{
+ std::string output_value;
+ if(columns[j].variable_name.empty())
+ {
+ ; // Separator column: use empty string.
+ }
+ else
+ {
+ output_value = interpolate_html.evaluate
+ (columns[j].variable_name
+ ,year
+ );
+ }
+
visible_values.push_back(output_value);
}
}