diff options
author | John Wiegley <johnw@newartisans.com> | 2004-09-06 05:43:56 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-09-06 05:43:56 -0400 |
commit | 93d73f828ce0425cb806b669a8075bd4b9e74340 (patch) | |
tree | 84b7fbcf102055630cbe2c891856dcd05de9598b | |
parent | fcaaa372019b525980e40b148a1d542ab3acced9 (diff) | |
download | fork-ledger-93d73f828ce0425cb806b669a8075bd4b9e74340.tar.gz fork-ledger-93d73f828ce0425cb806b669a8075bd4b9e74340.tar.bz2 fork-ledger-93d73f828ce0425cb806b669a8075bd4b9e74340.zip |
changed constructors to downgrade BALANCE and BALANCE_PAIR types when possible
-rw-r--r-- | value.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -46,8 +46,9 @@ class value_t *((unsigned int *) data) = value; type = INTEGER; } - value_t(const amount_t& value) : type(INTEGER) { - *this = value; + value_t(const amount_t& value) { + new((amount_t *)data) amount_t(value); + type = AMOUNT; } value_t(const balance_t& value) : type(INTEGER) { *this = value; |