diff options
author | John Wiegley <johnw@newartisans.com> | 2008-07-26 05:06:06 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-07-26 05:06:06 -0400 |
commit | 162d982b0cf1a5ac2e67012a3b8eadae3c1ac59f (patch) | |
tree | 1d29680db03ab4f8a82f77630a6e1a9fc10571bb /format.cc | |
parent | 961b30926b3b9f2b3e9c1a99df3f25fea6b13118 (diff) | |
download | fork-ledger-162d982b0cf1a5ac2e67012a3b8eadae3c1ac59f.tar.gz fork-ledger-162d982b0cf1a5ac2e67012a3b8eadae3c1ac59f.tar.bz2 fork-ledger-162d982b0cf1a5ac2e67012a3b8eadae3c1ac59f.zip |
The --verify option is now working properly again. Use "--verify --verbose"
if you wish to see memory usage statistics along with a top-level trace.
Diffstat (limited to 'format.cc')
-rw-r--r-- | format.cc | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -343,11 +343,19 @@ void format_t::format(std::ostream& out_str, const details_t& details) const case element_t::AMOUNT: case element_t::TOTAL: case element_t::VALUE_EXPR: { - value_expr calc; + value_expr * calc; switch (elem->type) { - case element_t::AMOUNT: calc = amount_expr; break; - case element_t::TOTAL: calc = total_expr; break; - case element_t::VALUE_EXPR: calc = elem->val_expr; break; + case element_t::AMOUNT: + assert(value_expr::amount_expr.get()); + calc = value_expr::amount_expr.get(); + break; + case element_t::TOTAL: + assert(value_expr::total_expr.get()); + calc = value_expr::total_expr.get(); + break; + case element_t::VALUE_EXPR: + calc = const_cast<value_expr *>(&elem->val_expr); + break; default: assert(false); break; |