diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-12 20:44:46 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-12 20:44:46 -0400 |
commit | e0e181d2af4aff5ac6c253fe25737bf93bfb6996 (patch) | |
tree | 2529b3a51d012ced6c94c6f97e1c86284f9eecc9 /src/balance.h | |
parent | e6bea6c3ebfc0762543b7a8ed68719aaf3abff16 (diff) | |
download | fork-ledger-e0e181d2af4aff5ac6c253fe25737bf93bfb6996.tar.gz fork-ledger-e0e181d2af4aff5ac6c253fe25737bf93bfb6996.tar.bz2 fork-ledger-e0e181d2af4aff5ac6c253fe25737bf93bfb6996.zip |
Made (un)reduce rvalue methods more consistent
They names were changed from reduce/unreduce to reduced/unreduced, since
they return the modified value. This is more consistent with the naming
of rounded/rounded.
Diffstat (limited to 'src/balance.h')
-rw-r--r-- | src/balance.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/balance.h b/src/balance.h index 2c4e4993..49435767 100644 --- a/src/balance.h +++ b/src/balance.h @@ -325,7 +325,7 @@ public: return temp; } - balance_t reduce() const { + balance_t reduced() const { balance_t temp(*this); temp.in_place_reduce(); return temp; @@ -335,11 +335,11 @@ public: // multiple component amounts to collapse to the same commodity. balance_t temp; foreach (const amounts_map::value_type& pair, amounts) - temp += pair.second.reduce(); + temp += pair.second.reduced(); return *this = temp; } - balance_t unreduce() const { + balance_t unreduced() const { balance_t temp(*this); temp.in_place_unreduce(); return temp; @@ -349,7 +349,7 @@ public: // multiple component amounts to collapse to the same commodity. balance_t temp; foreach (const amounts_map::value_type& pair, amounts) - temp += pair.second.unreduce(); + temp += pair.second.unreduced(); return *this = temp; } |