summaryrefslogtreecommitdiff
path: root/src/balpair.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-05-13 09:27:26 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:49 -0400
commit9044bf168ab0d8d6df03034898b1e5a4cb1559e8 (patch)
treecc5233bf5394f72b1b2cb7aa866cd8b67ff9d346 /src/balpair.h
parent994fb346993ddee2eaa4fb57eba2575636012b1a (diff)
downloadfork-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.h9
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;