Allow any two amount values to be divided

This commit is contained in:
John Wiegley 2009-02-24 14:55:05 -04:00
parent d396fa5145
commit c4207a79d7

View file

@ -624,12 +624,8 @@ value_t& value_t::operator/=(const value_t& val)
return *this;
case AMOUNT:
if (as_amount().commodity() == val.as_amount().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;
}