diff options
author | John Wiegley <johnw@newartisans.com> | 2006-03-04 14:46:04 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 05:48:44 -0400 |
commit | 581b3d5b9a3eebdd8f396d910386cadd9426b915 (patch) | |
tree | c7493496010c811cf276a1e68d7c10bc87e7abbd /value.cc | |
parent | 6375730fc9af02c27ec774aa2b9929095f5ffbde (diff) | |
download | fork-ledger-581b3d5b9a3eebdd8f396d910386cadd9426b915.tar.gz fork-ledger-581b3d5b9a3eebdd8f396d910386cadd9426b915.tar.bz2 fork-ledger-581b3d5b9a3eebdd8f396d910386cadd9426b915.zip |
*** no comment ***
Diffstat (limited to 'value.cc')
-rw-r--r-- | value.cc | 28 |
1 files changed, 0 insertions, 28 deletions
@@ -19,27 +19,6 @@ void value_t::destroy() } } -void value_t::simplify() -{ - if (! *this) { - *this = 0L; - return; - } - - if (type == BALANCE_PAIR && - (! ((balance_pair_t *) data)->cost || - ! *((balance_pair_t *) data)->cost)) - cast(BALANCE); - - if (type == BALANCE && - ((balance_t *) data)->amounts.size() == 1) - cast(AMOUNT); - - if (type == AMOUNT && - ! ((amount_t *) data)->commodity()) - cast(INTEGER); -} - value_t& value_t::operator=(const value_t& value) { if (this == &value) @@ -336,18 +315,11 @@ value_t& value_t::operator-=(const value_t& value) break; } - simplify(); - return *this; } value_t& value_t::operator*=(const value_t& value) { - if (! value) { - *this = 0L; - return *this; - } - switch (type) { case BOOLEAN: case INTEGER: |