summaryrefslogtreecommitdiff
path: root/amount.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-17 09:33:50 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:35:37 -0400
commit705ce8c6a15a90517aca57bdcd8f3a921179cb11 (patch)
tree2529259b8d093f7fef2507228b5f048f67419e7d /amount.cc
parent074533f006bc82f68fd14a97dc0fa46566d6bd08 (diff)
downloadfork-ledger-705ce8c6a15a90517aca57bdcd8f3a921179cb11.tar.gz
fork-ledger-705ce8c6a15a90517aca57bdcd8f3a921179cb11.tar.bz2
fork-ledger-705ce8c6a15a90517aca57bdcd8f3a921179cb11.zip
changes
Diffstat (limited to 'amount.cc')
-rw-r--r--amount.cc17
1 files changed, 0 insertions, 17 deletions
diff --git a/amount.cc b/amount.cc
index 44d41d5a..a971ebe3 100644
--- a/amount.cc
+++ b/amount.cc
@@ -632,23 +632,6 @@ amount_t& amount_t::operator/=(const amount_t& amt)
goto finish;
}
- if (has_commodity() && amt.has_commodity() &&
- commodity() != amt.commodity()) {
- throw new amount_error
- (std::string("Dividing amounts with different commodities: ") +
- (has_commodity() ? commodity_->qualified_symbol : "NONE") + " != " +
- (amt.has_commodity() ? amt.commodity_->qualified_symbol : "NONE"));
- }
-
- if (! amt.quantity || ! amt) {
- throw new amount_error("Divide by zero");
- }
- else if (! quantity) {
- *this = amt;
- *this = *this - *this; // preserve the foreign commodity
- goto finish;
- }
-
_dup();
// Increase the value's precision, to capture fractional parts after