lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master ea7a389 2/6: Improve local variable names


From: Greg Chicares
Subject: [lmi-commits] [lmi] master ea7a389 2/6: Improve local variable names
Date: Thu, 15 Mar 2018 20:12:22 -0400 (EDT)

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

    Improve local variable names
    
    Incidentally, write "min" before "max" wherever they occur together.
---
 ledger_base.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/ledger_base.cpp b/ledger_base.cpp
index cf1bb85..2252738 100644
--- a/ledger_base.cpp
+++ b/ledger_base.cpp
@@ -309,22 +309,22 @@ LedgerBase& LedgerBase::PlusEq
 
 int LedgerBase::DetermineScalePower() const
 {
-    double min_val = 0.0;
-    double max_val = 0.0;
+    double min_value = 0.0;
+    double max_value = 0.0;
 
     for(auto const& i : ScalableVectors)
         {
         minmax<double> extrema(*i.second);
-        min_val = std::min(min_val, extrema.minimum());
-        max_val = std::max(max_val, extrema.maximum());
+        min_value = std::min(min_value, extrema.minimum());
+        max_value = std::max(max_value, extrema.maximum());
         }
 
     // If minimum value is negative, it needs an extra character to
     // display the minus sign. So it needs as many characters as
     // ten times its absolute value.
     double widest = std::max
-        (max_val
-        ,min_val * -10
+        (min_value * -10
+        ,max_value
         );
 
 // TODO ?? It would be nicer to factor out



reply via email to

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