[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);
- [lmi-commits] [lmi] master updated (e13aa72 -> bd7e567), Greg Chicares, 2017/07/31
- [lmi-commits] [lmi] master 6ceeaf8 1/8: Say why headers are included if not obvious, Greg Chicares, 2017/07/31
- [lmi-commits] [lmi] master 8aea003 2/8: Fix defect introduced 20050114T1947Z: range error, Greg Chicares, 2017/07/31
- [lmi-commits] [lmi] master 5df1ad4 4/8: Resolve several marked defects [384], Greg Chicares, 2017/07/31
- [lmi-commits] [lmi] master 9051064 3/8: Improve label on age-70 row in Numeric Summary [388], Greg Chicares, 2017/07/31
- [lmi-commits] [lmi] master 9edce5a 5/8: Crudely paginate text output, Greg Chicares, 2017/07/31
- [lmi-commits] [lmi] master 615758f 6/8: Improve const-correctness,
Greg Chicares <=
- [lmi-commits] [lmi] master bd7e567 8/8: Show lapse years in Numeric Summary, Greg Chicares, 2017/07/31
- [lmi-commits] [lmi] master 1622e2f 7/8: Locally cache certain values, Greg Chicares, 2017/07/31