summaryrefslogtreecommitdiff
path: root/src/amount.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-05 16:15:09 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-05 16:15:09 -0400
commit290cac7b84b60305e185c140645c9bac2ca9fb0e (patch)
treec389da2eed81612ffb3868f61c31fa2534855fe1 /src/amount.h
parentf8bfbf8c250fa24bc9e26b9bf1eb64815a5a29ee (diff)
parent1417b40fdf0a92a85ab01f233c0ae076079901a2 (diff)
downloadfork-ledger-290cac7b84b60305e185c140645c9bac2ca9fb0e.tar.gz
fork-ledger-290cac7b84b60305e185c140645c9bac2ca9fb0e.tar.bz2
fork-ledger-290cac7b84b60305e185c140645c9bac2ca9fb0e.zip
Merge branch 'next'
Diffstat (limited to 'src/amount.h')
-rw-r--r--src/amount.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/amount.h b/src/amount.h
index ae0e5a69..49f33417 100644
--- a/src/amount.h
+++ b/src/amount.h
@@ -62,7 +62,6 @@ namespace ledger {
class commodity_t;
class annotation_t;
class keep_details_t;
-class commodity_pool_t;
DECLARE_EXCEPTION(amount_error, std::runtime_error);
@@ -275,7 +274,10 @@ public:
amount_t& operator+=(const amount_t& amt);
amount_t& operator-=(const amount_t& amt);
- amount_t& operator*=(const amount_t& amt);
+ amount_t& operator*=(const amount_t& amt) {
+ return multiply(amt);
+ }
+ amount_t& multiply(const amount_t& amt, bool ignore_commodity = false);
/** Divide two amounts while extending the precision to preserve the
accuracy of the result. For example, if \c 10 is divided by \c 3,
@@ -511,7 +513,7 @@ public:
amount's commodity:
commodity() returns an amount's commodity. If the amount has no
- commodity, the value returned is `current_pool->null_commodity'.
+ commodity, the value returned is the `null_commodity'.
has_commodity() returns true if the amount has a commodity.