From 1bb29cdbb7fa63d2fd5312e3fc81bcc489aaab5d Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 29 Jul 2008 21:38:20 -0400 Subject: The register report has begun printing real data, although not all the pieces are in place yet and the formatting is still off. --- value.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'value.cc') diff --git a/value.cc b/value.cc index 730ef2e6..a540068c 100644 --- a/value.cc +++ b/value.cc @@ -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& 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; -- cgit v1.2.3