summaryrefslogtreecommitdiff
path: root/src/value.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-05-01 04:36:49 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:35 -0400
commite92bcf411d2e9a55969303ba3893a017152d7c18 (patch)
treee7b52d09751de39c86ede91f88a2fcf24facfb27 /src/value.h
parent50a9caf302936ba6f61bbe05b4718f199d0d584c (diff)
downloadfork-ledger-e92bcf411d2e9a55969303ba3893a017152d7c18.tar.gz
fork-ledger-e92bcf411d2e9a55969303ba3893a017152d7c18.tar.bz2
fork-ledger-e92bcf411d2e9a55969303ba3893a017152d7c18.zip
Started using boost::optional<T>.
Diffstat (limited to 'src/value.h')
-rw-r--r--src/value.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/value.h b/src/value.h
index 0737fac1..4c6e0f18 100644
--- a/src/value.h
+++ b/src/value.h
@@ -435,7 +435,6 @@ class value_t
return 0;
}
- void in_place_abs();
value_t abs() const;
void in_place_cast(type_t cast_type);
value_t cost() const;
@@ -453,10 +452,11 @@ class value_t
const bool keep_date = amount_t::keep_date,
const bool keep_tag = amount_t::keep_tag) const;
- value_t& add(const amount_t& amount, const amount_t * cost = NULL);
+ value_t& add(const amount_t& amount,
+ const optional<amount_t>& cost = optional<amount_t>());
value_t value(const moment_t& moment) const;
- void in_place_reduce();
+ void in_place_reduce();
value_t reduce() const {
value_t temp(*this);
temp.in_place_reduce();