From 82d0ee869be4636fb285f7fc61620ecd747f46f9 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 13 Mar 2006 08:39:12 +0000 Subject: Added --ansi and --ansi-invert options. --- amount.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'amount.cc') diff --git a/amount.cc b/amount.cc index 67a0ec8c..cad3e64d 100644 --- a/amount.cc +++ b/amount.cc @@ -1344,7 +1344,7 @@ void amount_t::annotate_commodity(const amount_t& price, if (commodity().annotated) { this_ann = &static_cast(commodity()); - this_base = this_ann->base; + this_base = this_ann->ptr; } else { this_base = &commodity(); } @@ -1392,7 +1392,7 @@ amount_t amount_t::strip_annotations(const bool _keep_price, (_keep_tag && ! ann_comm.tag.empty())) { new_comm = annotated_commodity_t::find_or_create - (*ann_comm.base, _keep_price ? ann_comm.price : amount_t(), + (*ann_comm.ptr, _keep_price ? ann_comm.price : amount_t(), _keep_date ? ann_comm.date : 0, _keep_tag ? ann_comm.tag : ""); } else { new_comm = commodity_t::find_or_create(ann_comm.base_symbol()); @@ -1465,7 +1465,7 @@ commodity_t * commodity_t::create(const std::string& symbol) { std::auto_ptr commodity(new commodity_t); - commodity->ptr = commodity_base_t::create(symbol); + commodity->base = commodity_base_t::create(symbol); if (needs_quotes(symbol)) { commodity->qualified_symbol = "\""; @@ -1607,10 +1607,10 @@ annotated_commodity_t::create(const commodity_t& comm, commodity->date = date; commodity->tag = tag; - commodity->base = &comm; - assert(commodity->base); - commodity->ptr = comm.ptr; + commodity->ptr = &comm; assert(commodity->ptr); + commodity->base = comm.base; + assert(commodity->base); commodity->qualified_symbol = comm.symbol(); -- cgit v1.2.3