summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-24 14:55:05 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-24 14:55:05 -0400
commitc4207a79d7250f95d259678d0e4077a2a39b1d32 (patch)
tree280b102b8b3900e31fde71aa8f52c57bce8c4c47
parentd396fa51455da67dd0b8f508754b89ae906fa75f (diff)
downloadfork-ledger-c4207a79d7250f95d259678d0e4077a2a39b1d32.tar.gz
fork-ledger-c4207a79d7250f95d259678d0e4077a2a39b1d32.tar.bz2
fork-ledger-c4207a79d7250f95d259678d0e4077a2a39b1d32.zip
Allow any two amount values to be divided
-rw-r--r--src/value.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/value.cc b/src/value.cc
index 1c2541b8..1706f2fe 100644
--- a/src/value.cc
+++ b/src/value.cc
@@ -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;
}