summaryrefslogtreecommitdiff
path: root/src/quotes.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-25 14:20:07 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-25 14:20:07 -0500
commite8a14d31b6aefe421796fca1e50f4ea1e3816536 (patch)
tree77ccfc5c88c9569b9ad02790c754d8d498b7240b /src/quotes.cc
parent98ea23cd59cf959f3561632cc38043ab2d89f164 (diff)
parenta3338a2a67a793ddbbc1b0f93901d9a978dc1a8c (diff)
downloadfork-ledger-e8a14d31b6aefe421796fca1e50f4ea1e3816536.tar.gz
fork-ledger-e8a14d31b6aefe421796fca1e50f4ea1e3816536.tar.bz2
fork-ledger-e8a14d31b6aefe421796fca1e50f4ea1e3816536.zip
Merge branch 'next'
Diffstat (limited to 'src/quotes.cc')
-rw-r--r--src/quotes.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/quotes.cc b/src/quotes.cc
index ffe2142a..f892e93f 100644
--- a/src/quotes.cc
+++ b/src/quotes.cc
@@ -75,7 +75,7 @@ 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 =
+ 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
@@ -86,12 +86,12 @@ commodity_quote_from_script(commodity_t& commodity,
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",