diff options
author | John Wiegley <johnw@newartisans.com> | 2006-03-13 08:39:12 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:41:30 -0400 |
commit | 82d0ee869be4636fb285f7fc61620ecd747f46f9 (patch) | |
tree | e65d7bff14d13e71738d55660a39938c2e4973eb /amount.cc | |
parent | fd525ec3821f16ec3df8096a0080da797f7946c5 (diff) | |
download | fork-ledger-82d0ee869be4636fb285f7fc61620ecd747f46f9.tar.gz fork-ledger-82d0ee869be4636fb285f7fc61620ecd747f46f9.tar.bz2 fork-ledger-82d0ee869be4636fb285f7fc61620ecd747f46f9.zip |
Added --ansi and --ansi-invert options.
Diffstat (limited to 'amount.cc')
-rw-r--r-- | amount.cc | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1344,7 +1344,7 @@ void amount_t::annotate_commodity(const amount_t& price, if (commodity().annotated) { this_ann = &static_cast<annotated_commodity_t&>(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_t> 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(); |