diff options
author | John Wiegley <johnw@newartisans.com> | 2007-05-13 09:27:26 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:49 -0400 |
commit | 9044bf168ab0d8d6df03034898b1e5a4cb1559e8 (patch) | |
tree | cc5233bf5394f72b1b2cb7aa866cd8b67ff9d346 /src/balpair.h | |
parent | 994fb346993ddee2eaa4fb57eba2575636012b1a (diff) | |
download | fork-ledger-9044bf168ab0d8d6df03034898b1e5a4cb1559e8.tar.gz fork-ledger-9044bf168ab0d8d6df03034898b1e5a4cb1559e8.tar.bz2 fork-ledger-9044bf168ab0d8d6df03034898b1e5a4cb1559e8.zip |
*** no comment ***
Diffstat (limited to 'src/balpair.h')
-rw-r--r-- | src/balpair.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/balpair.h b/src/balpair.h index 358b74f4..c406394e 100644 --- a/src/balpair.h +++ b/src/balpair.h @@ -157,12 +157,11 @@ public: return temp; } - optional<amount_t> amount(const optional<const commodity_t&>& commodity = - optional<const commodity_t&>()) const { + optional<amount_t> + amount(const optional<const commodity_t&>& commodity = none) const { return quantity.amount(commodity); } - optional<balance_t> value(const optional<moment_t>& moment = - optional<moment_t>()) const { + optional<balance_t> value(const optional<moment_t>& moment = none) const { return quantity.value(moment); } @@ -179,7 +178,7 @@ public: } balance_pair_t& add(const amount_t& amt, - const optional<amount_t>& a_cost = optional<amount_t>()) { + const optional<amount_t>& a_cost = none) { if (a_cost && ! cost) cost = quantity; quantity += amt; |