summaryrefslogtreecommitdiff
path: root/src/quotes.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/quotes.cc')
-rw-r--r--src/quotes.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/quotes.cc b/src/quotes.cc
index 7f41e4ff..f892e93f 100644
--- a/src/quotes.cc
+++ b/src/quotes.cc
@@ -75,23 +75,23 @@ commodity_quote_from_script(commodity_t& commodity,
if (char * p = std::strchr(buf, '\n')) *p = '\0';
DEBUG("commodity.download", "downloaded quote: " << buf);
- if (optional<price_point_t> point =
- amount_t::current_pool->parse_price_directive(buf)) {
- if (amount_t::current_pool->price_db) {
+ if (optional<std::pair<commodity_t *, price_point_t> > point =
+ commodity_pool_t::current_pool->parse_price_directive(buf)) {
+ if (commodity_pool_t::current_pool->price_db) {
#if defined(__GNUG__) && __GNUG__ < 3
- ofstream database(*amount_t::current_pool->price_db,
+ ofstream database(*commodity_pool_t::current_pool->price_db,
ios::out | ios::app);
#else
- ofstream database(*amount_t::current_pool->price_db,
+ ofstream database(*commodity_pool_t::current_pool->price_db,
std::ios_base::out | std::ios_base::app);
#endif
database << "P "
- << format_datetime(point->when, FMT_WRITTEN)
+ << format_datetime(point->second.when, FMT_WRITTEN)
<< " " << commodity.symbol()
- << " " << point->price
+ << " " << point->second.price
<< std::endl;
}
- return point;
+ return point->second;
}
} else {
DEBUG("commodity.download",