From a2c73120809ba78dfdeb75f5ff0956e5f41e5975 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 5 Mar 2009 22:39:32 -0400 Subject: Renamed some flags and members in post_t --- src/post.cc | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/post.cc') diff --git a/src/post.cc b/src/post.cc index 4289433e..98899946 100644 --- a/src/post.cc +++ b/src/post.cc @@ -140,12 +140,10 @@ namespace { } value_t get_amount(post_t& post) { - if (post.has_xdata() && - post.xdata().has_flags(POST_EXT_COMPOUND)) { - return post.xdata().value; - } else { + if (post.has_xdata() && post.xdata().has_flags(POST_EXT_COMPOUND)) + return post.xdata().compound_value; + else return post.amount; - } } value_t get_use_direct_amount(post_t& post) { @@ -169,7 +167,7 @@ namespace { return *post.cost; else if (post.has_xdata() && post.xdata().has_flags(POST_EXT_COMPOUND)) - return post.xdata().value; + return post.xdata().compound_value; else return post.amount; } @@ -365,13 +363,13 @@ bool post_t::valid() const return true; } -void post_t::add_to_value(value_t& value, expr_t& expr) +void post_t::add_to_value(value_t& value, const optional& expr) const { if (xdata_ && xdata_->has_flags(POST_EXT_COMPOUND)) { - add_or_set_value(value, xdata_->value); + add_or_set_value(value, xdata_->compound_value); } else { - bind_scope_t bound_scope(*expr.get_context(), *this); - add_or_set_value(value, expr.calc(bound_scope)); + bind_scope_t bound_scope(*expr->get_context(), const_cast(*this)); + add_or_set_value(value, expr->calc(bound_scope)); } } -- cgit v1.2.3