[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master d143cbe 5/7: Use C++17 if-with-initializer to
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master d143cbe 5/7: Use C++17 if-with-initializer to properly localize a variable |
Date: |
Tue, 18 Sep 2018 13:29:30 -0400 (EDT) |
branch: master
commit d143cbea265d913ddfa5c07af74a7423cefdae9b
Author: Vadim Zeitlin <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Use C++17 if-with-initializer to properly localize a variable
No changes, just declare a variable used only in an "if" statement body
inside the "if" itself to scope it properly.
---
ledger_pdf_generator_wx.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index 53948fa..22203e2 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -1031,8 +1031,7 @@ class page_with_footer : public page
auto y = footer_top_;
- auto const& upper_template = get_upper_footer_template_name();
- if(!upper_template.empty())
+ if(auto const& upper_template = get_upper_footer_template_name();
!upper_template.empty())
{
y += pdf_dc.GetCharHeight();
- [lmi-commits] [lmi] master updated (be7b9ff -> 1c398a8), Greg Chicares, 2018/09/18
- [lmi-commits] [lmi] master f4cf784 3/7: Make standard_supplemental_report ctor helper static, Greg Chicares, 2018/09/18
- [lmi-commits] [lmi] master e3d4471 1/7: Upgrade wx, Greg Chicares, 2018/09/18
- [lmi-commits] [lmi] master d143cbe 5/7: Use C++17 if-with-initializer to properly localize a variable,
Greg Chicares <=
- [lmi-commits] [lmi] master 71dc467 4/7: Pass the illustration and interpolator to the page ctor, Greg Chicares, 2018/09/18
- [lmi-commits] [lmi] master a3ee7ce 2/7: Instal wxPdfDocument using Git instead of snapshot download, Greg Chicares, 2018/09/18
- [lmi-commits] [lmi] master b2ec7ac 6/7: Avoid parsing the same HTML more than once in standard pages, Greg Chicares, 2018/09/18
- [lmi-commits] [lmi] master 1c398a8 7/7: Implement support for headers for normal PDF illustration pages, Greg Chicares, 2018/09/18