diff options
author | John Wiegley <johnw@newartisans.com> | 2004-08-29 04:31:59 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-08-29 04:31:59 -0400 |
commit | 2d62f7b633bdaa39c650bb67425514cf1e66a4dd (patch) | |
tree | ffe42356e5e83f2cbc2cce74a8566ea1ac738e8b /valexpr.cc | |
parent | 032afa5657bd600476cde256b6d7db84fde7d038 (diff) | |
download | fork-ledger-2d62f7b633bdaa39c650bb67425514cf1e66a4dd.tar.gz fork-ledger-2d62f7b633bdaa39c650bb67425514cf1e66a4dd.tar.bz2 fork-ledger-2d62f7b633bdaa39c650bb67425514cf1e66a4dd.zip |
redid the way amount_t::commodity is handled; no more direct access
Diffstat (limited to 'valexpr.cc')
-rw-r--r-- | valexpr.cc | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -218,11 +218,9 @@ void value_expr_t::compute(value_t& result, const details_t& details) const // jww (2004-08-17): do something smarter here? result.cast(value_t::AMOUNT); } - if (result.type == value_t::AMOUNT) { - amount_t amt = result; - amt.commodity = commodity_t::null_commodity; - result = amt; - } + // jww (2004-08-29): maybe this should be strip_commodity? + if (result.type == value_t::AMOUNT) + ((amount_t *) result.data)->set_commodity(*commodity_t::null_commodity); break; } |