diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-09 07:38:45 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-09 07:47:45 -0400 |
commit | c28fad384c28fb929fc8ea69854496141bdf306a (patch) | |
tree | 9b4d0197448cd8587e11f5e3e65214e9dc80e3a7 /src/pool.cc | |
parent | 8637dd6ccf7afc71d911cd66c4a55a1308596dbb (diff) | |
download | fork-ledger-c28fad384c28fb929fc8ea69854496141bdf306a.tar.gz fork-ledger-c28fad384c28fb929fc8ea69854496141bdf306a.tar.bz2 fork-ledger-c28fad384c28fb929fc8ea69854496141bdf306a.zip |
The --anon option now anonymizes commodities
Fixes #227 / 1C90D8AF-830E-43C2-A5B7-D382F68EBDE3
Diffstat (limited to 'src/pool.cc')
-rw-r--r-- | src/pool.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/pool.cc b/src/pool.cc index ad97a9c6..5285be92 100644 --- a/src/pool.cc +++ b/src/pool.cc @@ -57,7 +57,7 @@ commodity_t * commodity_pool_t::create(const string& symbol) base_commodity(new commodity_t::base_t(symbol)); std::auto_ptr<commodity_t> commodity(new commodity_t(this, base_commodity)); - DEBUG("amounts.commodities", "Creating base commodity " << symbol); + DEBUG("pool.commodities", "Creating base commodity " << symbol); // Create the "qualified symbol" version of this commodity's symbol if (commodity_t::symbol_needs_quotes(symbol)) { @@ -66,7 +66,7 @@ commodity_t * commodity_pool_t::create(const string& symbol) *commodity->qualified_symbol += "\""; } - DEBUG("amounts.commodities", + DEBUG("pool.commodities", "Creating commodity '" << commodity->symbol() << "'"); std::pair<commodities_map::iterator, bool> result @@ -79,7 +79,7 @@ commodity_t * commodity_pool_t::create(const string& symbol) commodity_t * commodity_pool_t::find_or_create(const string& symbol) { - DEBUG("amounts.commodities", "Find-or-create commodity " << symbol); + DEBUG("pool.commodities", "Find-or-create commodity " << symbol); commodity_t * commodity = find(symbol); if (commodity) @@ -89,7 +89,7 @@ commodity_t * commodity_pool_t::find_or_create(const string& symbol) commodity_t * commodity_pool_t::find(const string& symbol) { - DEBUG("amounts.commodities", "Find commodity " << symbol); + DEBUG("pool.commodities", "Find commodity " << symbol); commodities_map::const_iterator i = commodities.find(symbol); if (i != commodities.end()) @@ -124,10 +124,10 @@ string commodity_pool_t::make_qualified_name(const commodity_t& comm, #if defined(DEBUG_ON) if (comm.qualified_symbol) - DEBUG("amounts.commodities", "make_qualified_name for " + DEBUG("pool.commodities", "make_qualified_name for " << *comm.qualified_symbol << std::endl << details); #endif - DEBUG("amounts.commodities", "qualified_name is " << name.str()); + DEBUG("pool.commodities", "qualified_name is " << name.str()); return name.str(); } @@ -156,7 +156,7 @@ commodity_t * commodity_pool_t::find_or_create(const string& symbol, const annotation_t& details) { - commodity_t * comm = find(symbol); + commodity_t * comm = find_or_create(symbol); if (! comm) return NULL; @@ -181,7 +181,7 @@ commodity_pool_t::create(commodity_t& comm, commodity->qualified_symbol = comm.symbol(); assert(! commodity->qualified_symbol->empty()); - DEBUG("amounts.commodities", "Creating annotated commodity " + DEBUG("pool.commodities", "Creating annotated commodity " << "symbol " << commodity->symbol() << " key " << mapping_key << std::endl << details); |