Allow any two amount values to be divided
This commit is contained in:
parent
d396fa5145
commit
c4207a79d7
1 changed files with 2 additions and 6 deletions
|
|
@ -624,12 +624,8 @@ value_t& value_t::operator/=(const value_t& val)
|
||||||
return *this;
|
return *this;
|
||||||
|
|
||||||
case AMOUNT:
|
case AMOUNT:
|
||||||
if (as_amount().commodity() == val.as_amount().commodity() ||
|
as_amount_lval() /= val.as_amount();
|
||||||
! val.as_amount().has_commodity()) {
|
return *this;
|
||||||
as_amount_lval() /= val.as_amount();
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue