summaryrefslogtreecommitdiff
path: root/src/pool.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-19 21:53:02 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-19 22:24:24 -0500
commit4e30fcdf4094a0c450cbe1918c2e12dd19eb58f2 (patch)
treee4bce67522d52cd7be03544501191d761dce7799 /src/pool.cc
parent6e31328bd62d15e8da4238394abd8de65539cfa2 (diff)
downloadfork-ledger-4e30fcdf4094a0c450cbe1918c2e12dd19eb58f2.tar.gz
fork-ledger-4e30fcdf4094a0c450cbe1918c2e12dd19eb58f2.tar.bz2
fork-ledger-4e30fcdf4094a0c450cbe1918c2e12dd19eb58f2.zip
Many improvements to Ledger's Python bindings
Diffstat (limited to 'src/pool.cc')
-rw-r--r--src/pool.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pool.cc b/src/pool.cc
index b08c8fad..9e06613f 100644
--- a/src/pool.cc
+++ b/src/pool.cc
@@ -39,6 +39,8 @@
namespace ledger {
+shared_ptr<commodity_pool_t> commodity_pool_t::current_pool;
+
commodity_pool_t::commodity_pool_t()
: default_commodity(NULL), keep_base(false),
quote_leeway(86400), get_quotes(false),
@@ -318,8 +320,7 @@ optional<price_point_t> commodity_pool_t::parse_price_directive(char * line)
VERIFY(point.price.valid());
DEBUG("commodity.download", "Looking up symbol: " << symbol);
- if (commodity_t * commodity =
- amount_t::current_pool->find_or_create(symbol)) {
+ if (commodity_t * commodity = find_or_create(symbol)) {
DEBUG("commodity.download", "Adding price for " << symbol << ": "
<< point.when << " " << point.price);
commodity->add_price(point.when, point.price, true);