summaryrefslogtreecommitdiff
path: root/src/value.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/value.cc')
-rw-r--r--src/value.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/value.cc b/src/value.cc
index 7af2fd1e..e5ced56e 100644
--- a/src/value.cc
+++ b/src/value.cc
@@ -1401,8 +1401,7 @@ bool value_t::is_zero() const
return false;
}
-value_t value_t::value(const bool primary_only,
- const optional<datetime_t>& moment,
+value_t value_t::value(const optional<datetime_t>& moment,
const optional<commodity_t&>& in_terms_of) const
{
switch (type()) {
@@ -1411,13 +1410,13 @@ value_t value_t::value(const bool primary_only,
case AMOUNT:
if (optional<amount_t> val =
- as_amount().value(primary_only, moment, in_terms_of))
+ as_amount().value(moment, in_terms_of))
return *val;
return NULL_VALUE;
case BALANCE:
if (optional<balance_t> bal =
- as_balance().value(primary_only, moment, in_terms_of))
+ as_balance().value(moment, in_terms_of))
return *bal;
return NULL_VALUE;
@@ -1455,7 +1454,7 @@ value_t value_t::exchange_commodities(const std::string& commodities,
if (commodity_t * commodity =
commodity_pool_t::current_pool->parse_price_expression(p, add_prices,
moment)) {
- value_t result = value(false, moment, *commodity);
+ value_t result = value(moment, *commodity);
if (! result.is_null())
return result;
}