summaryrefslogtreecommitdiff
path: root/value.cc
diff options
context:
space:
mode:
Diffstat (limited to 'value.cc')
-rw-r--r--value.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/value.cc b/value.cc
index a60de5bd..807926bc 100644
--- a/value.cc
+++ b/value.cc
@@ -694,14 +694,12 @@ bool value_t::operator OP(const value_t& value) \
return *((amount_t *) data) OP *((amount_t *) value.data); \
\
case BALANCE: \
- return (*((amount_t *) data) OP \
- ((balance_t *) value.data)-> \
- amount(((amount_t *) data)->commodity())); \
+ return (balance_t(*((amount_t *) data)) OP \
+ *((balance_t *) value.data)); \
\
case BALANCE_PAIR: \
- return (*((amount_t *) data) OP \
- ((balance_pair_t *) value.data)-> \
- quantity.amount(((amount_t *) data)->commodity())); \
+ return (balance_t(*((amount_t *) data)) OP \
+ *((balance_pair_t *) value.data)); \
\
default: \
assert(0); \