[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
- [lmi-commits] [lmi] master updated (17e1597 -> 566fa11), Greg Chicares, 2018/03/15
- [lmi-commits] [lmi] master ea7a389 2/6: Improve local variable names,
Greg Chicares <=
- [lmi-commits] [lmi] master f2a2eff 5/6: Factor out the tricky part of ledger scaling, to permit unit testing, Greg Chicares, 2018/03/15
- [lmi-commits] [lmi] master ca96637 4/6: Fix an obvious optimization failure, Greg Chicares, 2018/03/15
- [lmi-commits] [lmi] master e95a948 1/6: Improve documentation, Greg Chicares, 2018/03/15
- [lmi-commits] [lmi] master cde9755 3/6: Factor out max-power-of-10 parameter [383], Greg Chicares, 2018/03/15
- [lmi-commits] [lmi] master 566fa11 6/6: Show scaled units on a page with scaled values, Greg Chicares, 2018/03/15