summaryrefslogtreecommitdiff
path: root/amount.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-17 07:33:36 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:35:36 -0400
commit0f2cad4cab7ef99e1ad33be34ea813213da7288d (patch)
tree0dbd64dfdb1022d811d2dfdc5f3693f5faafafb8 /amount.h
parent2e3082e734362fb934ff8f308fe9fd9f85c35032 (diff)
downloadfork-ledger-0f2cad4cab7ef99e1ad33be34ea813213da7288d.tar.gz
fork-ledger-0f2cad4cab7ef99e1ad33be34ea813213da7288d.tar.bz2
fork-ledger-0f2cad4cab7ef99e1ad33be34ea813213da7288d.zip
Got most of the commodity tests working, save multiplication and division.
Diffstat (limited to 'amount.h')
-rw-r--r--amount.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/amount.h b/amount.h
index 680bd57f..9f16f305 100644
--- a/amount.h
+++ b/amount.h
@@ -107,6 +107,12 @@ class amount_t
_release();
}
+ amount_t number() const {
+ amount_t temp(*this);
+ temp.clear_commodity();
+ return temp;
+ }
+
bool has_commodity() const;
commodity_t& commodity() const;
void set_commodity(commodity_t& comm) {