lmi-commits
[Top][All Lists]
Advanced

[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();
 



reply via email to

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