summaryrefslogtreecommitdiff
path: root/src/pool.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-06 23:04:27 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-03-06 23:04:27 -0600
commit71d0033b6f65260698cf0bf367002a9b6429a3fd (patch)
tree63fc939f0e613a1828fc0b7b473bc6c29578f074 /src/pool.cc
parent488355e5d92923e1d764625457b866f4fc83d58b (diff)
downloadfork-ledger-71d0033b6f65260698cf0bf367002a9b6429a3fd.tar.gz
fork-ledger-71d0033b6f65260698cf0bf367002a9b6429a3fd.tar.bz2
fork-ledger-71d0033b6f65260698cf0bf367002a9b6429a3fd.zip
Corrected several compile and link problems
Diffstat (limited to 'src/pool.cc')
-rw-r--r--src/pool.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/pool.cc b/src/pool.cc
index ca50db2c..a6ae0919 100644
--- a/src/pool.cc
+++ b/src/pool.cc
@@ -70,9 +70,11 @@ commodity_t * commodity_pool_t::create(const string& symbol)
DEBUG("pool.commodities",
"Creating commodity '" << commodity->symbol() << "'");
- std::pair<commodities_map::iterator, bool> result
- = commodities.insert(commodities_map::value_type
- (commodity->base_symbol(), commodity));
+#if defined(DEBUG_ON)
+ std::pair<commodities_map::iterator, bool> result =
+#endif
+ commodities.insert(commodities_map::value_type
+ (commodity->base_symbol(), commodity));
assert(result.second);
commodity_price_history.add_commodity(*commodity.get());
@@ -211,10 +213,12 @@ commodity_pool_t::create(commodity_t& comm,
<< "symbol " << commodity->symbol()
<< std::endl << details);
- std::pair<annotated_commodities_map::iterator, bool> result
- = annotated_commodities.insert(annotated_commodities_map::value_type
- (annotated_commodities_map::key_type
- (comm.symbol(), details), commodity));
+#if defined(DEBUG_ON)
+ std::pair<annotated_commodities_map::iterator, bool> result =
+#endif
+ annotated_commodities.insert(annotated_commodities_map::value_type
+ (annotated_commodities_map::key_type
+ (comm.symbol(), details), commodity));
assert(result.second);
return commodity.get();