changed constructors to downgrade BALANCE and BALANCE_PAIR types when possible

This commit is contained in:
John Wiegley 2004-09-06 05:43:56 -04:00
parent fcaaa37201
commit 93d73f828c

View file

@ -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;