From 162d982b0cf1a5ac2e67012a3b8eadae3c1ac59f Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 26 Jul 2008 05:06:06 -0400 Subject: 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. --- format.cc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'format.cc') diff --git a/format.cc b/format.cc index 2312d98a..b72a4739 100644 --- a/format.cc +++ b/format.cc @@ -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(&elem->val_expr); + break; default: assert(false); break; -- cgit v1.2.3