From a8768587c8e6850e23ecbbfe4a108515b8ade892 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 27 Oct 2009 08:03:16 -0400 Subject: Allow any amount to be multipled by another The result carries the commodity of the first amount, or the second if the first had no commodity. --- src/value.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/value.cc') diff --git a/src/value.cc b/src/value.cc index c3a3a05b..17987bd7 100644 --- a/src/value.cc +++ b/src/value.cc @@ -585,13 +585,8 @@ value_t& value_t::operator*=(const value_t& val) as_amount_lval() *= val.as_long(); return *this; case AMOUNT: - if (as_amount().commodity() == val.as_amount().commodity() || - ! as_amount().has_commodity() || - ! val.as_amount().has_commodity()) { - as_amount_lval() *= val.as_amount(); - return *this; - } - break; + as_amount_lval() *= val.as_amount(); + return *this; default: break; } -- cgit v1.2.3