diff options
Diffstat (limited to 'src/amount.h')
-rw-r--r-- | src/amount.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/amount.h b/src/amount.h index 1db59b7e..903a01cd 100644 --- a/src/amount.h +++ b/src/amount.h @@ -404,10 +404,10 @@ public: $100.00. */ optional<amount_t> - value(const optional<datetime_t>& moment = none, - const optional<commodity_t&>& in_terms_of = none) const; + value(const datetime_t& moment = datetime_t(), + const commodity_t * in_terms_of = NULL) const; - amount_t price() const; + optional<amount_t> price() const; /*@}*/ @@ -533,7 +533,10 @@ public: number() returns a commodity-less version of an amount. This is useful for accessing just the numeric portion of an amount. */ - commodity_t& commodity() const; + commodity_t * commodity_ptr() const; + commodity_t& commodity() const { + return *commodity_ptr(); + } bool has_commodity() const; void set_commodity(commodity_t& comm) { |