lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 615758f 6/8: Improve const-correctness


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 615758f 6/8: Improve const-correctness
Date: Mon, 31 Jul 2017 17:24:18 -0400 (EDT)

branch: master
commit 615758f8bfb2323483a9205fccf6bade9b743ac0
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Improve const-correctness
---
 ledger_text_formats.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ledger_text_formats.cpp b/ledger_text_formats.cpp
index 69ebdf1..0d1126e 100644
--- a/ledger_text_formats.cpp
+++ b/ledger_text_formats.cpp
@@ -463,7 +463,7 @@ void PrintCellTabDelimited
     LedgerVariant   const& Curr_ = ledger_values.GetCurrFull();
     LedgerVariant   const& Guar_ = ledger_values.GetGuarFull();
 
-    int max_length = ledger_values.GetMaxLength();
+    int const max_length = ledger_values.GetMaxLength();
 
     // TODO ?? This const_cast is safe, but it's still unclean.
     LedgerInvariant& unclean = const_cast<LedgerInvariant&>(Invar);
@@ -897,10 +897,10 @@ void PrintLedgerFlatText
 //   - Wrap long strings.
 namespace
 {
-    int g_width = 128;
+    int const g_width = 128;
     std::string center(std::string const& s)
         {
-        int z = s.length();
+        int const z = s.length();
         // Strings in the input class might be too wide; absent more
         // graceful handling, at least no attempt is made to cure that
         // problem with a negative number of spaces.
@@ -1123,7 +1123,7 @@ void FlatTextLedgerPrinter::PrintTabularDetailHeader() 
const
 
 void FlatTextLedgerPrinter::PrintTabularDetail() const
 {
-    int age = value_cast<int>(invar().Age);
+    int const age = value_cast<int>(invar().Age);
     for(int j = 0; j < ledger_.GetMaxLength(); ++j)
         {
         os_.setf(std::ios_base::fixed, std::ios_base::floatfield);



reply via email to

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