diff options
author | John Wiegley <johnw@newartisans.com> | 2008-07-29 21:38:20 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-07-29 21:44:21 -0400 |
commit | 1bb29cdbb7fa63d2fd5312e3fc81bcc489aaab5d (patch) | |
tree | d5c7e3897763a8a9d4b05c438d1c1bcb8020ee04 /value.cc | |
parent | 42e1d725aa9deb41396ba4c73c8499c7c3798508 (diff) | |
download | fork-ledger-1bb29cdbb7fa63d2fd5312e3fc81bcc489aaab5d.tar.gz fork-ledger-1bb29cdbb7fa63d2fd5312e3fc81bcc489aaab5d.tar.bz2 fork-ledger-1bb29cdbb7fa63d2fd5312e3fc81bcc489aaab5d.zip |
The register report has begun printing real data, although not all the pieces
are in place yet and the formatting is still off.
Diffstat (limited to 'value.cc')
-rw-r--r-- | value.cc | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -67,7 +67,7 @@ value_t::storage_t& value_t::storage_t::operator=(const value_t::storage_t& rhs) break; default: - // The rest are fundamental types, which can copy using std::memcpy + // The rest are fundamental types, which can be copied using std::memcpy std::memcpy(data, rhs.data, sizeof(data)); break; } @@ -1458,20 +1458,18 @@ value_t& value_t::add(const amount_t& amount, const optional<amount_t>& tcost) else if (! is_amount()) { in_place_cast(AMOUNT); } - *this += amount; - break; + return *this += amount; case BALANCE: if (tcost) { in_place_cast(BALANCE_PAIR); return add(amount, tcost); } - *this += amount; - break; + return *this += amount; case BALANCE_PAIR: as_balance_pair_lval().add(amount, tcost); - break; + return *this; default: break; |