fixed another value_t comparison issue

This commit is contained in:
John Wiegley 2004-09-25 06:02:31 -04:00
parent 555c2d855f
commit 2eb2b1428b
2 changed files with 7 additions and 8 deletions

View file

@ -463,8 +463,7 @@ class balance_pair_t
balance_pair_t(const amount_t& _quantity) balance_pair_t(const amount_t& _quantity)
: quantity(_quantity), cost(NULL) {} : quantity(_quantity), cost(NULL) {}
template <typename T> template <typename T>
balance_pair_t(T value) balance_pair_t(T value) : quantity(value), cost(NULL) {}
: quantity(value), cost(NULL) {}
// destructor // destructor
~balance_pair_t() { ~balance_pair_t() {

View file

@ -236,16 +236,16 @@ bool value_t::operator OP(const value_t& value) \
*((unsigned int *) value.data)); \ *((unsigned int *) value.data)); \
\ \
case AMOUNT: \ case AMOUNT: \
return (*((unsigned int *) data) OP \ return (amount_t(*((unsigned int *) data)) OP \
((unsigned int) *((amount_t *) value.data))); \ *((amount_t *) value.data)); \
\ \
case BALANCE: \ case BALANCE: \
return (*((unsigned int *) data) OP \ return (balance_t(*((unsigned int *) data)) OP \
((unsigned int) *((balance_t *) value.data))); \ *((balance_t *) value.data)); \
\ \
case BALANCE_PAIR: \ case BALANCE_PAIR: \
return (*((unsigned int *) data) OP \ return (balance_pair_t(*((unsigned int *) data)) OP \
((unsigned int) *((balance_pair_t *) value.data))); \ *((balance_pair_t *) value.data)); \
\ \
default: \ default: \
assert(0); \ assert(0); \