From 93d73f828ce0425cb806b669a8075bd4b9e74340 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 6 Sep 2004 05:43:56 -0400 Subject: changed constructors to downgrade BALANCE and BALANCE_PAIR types when possible --- value.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/value.h b/value.h index 34af0f73..39a258b5 100644 --- a/value.h +++ b/value.h @@ -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; -- cgit v1.2.3