diff options
Diffstat (limited to 'quotes.cc')
-rw-r--r-- | quotes.cc | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -22,12 +22,12 @@ void quotes_by_script::operator()(commodity_t& commodity, DEBUG_PRINT_TIME_(moment); DEBUG_PRINT_TIME_(date); DEBUG_PRINT_TIME_(last); - if (commodity.history) - DEBUG_PRINT_TIME_(commodity.history->last_lookup); + if (commodity.history()) + DEBUG_PRINT_TIME_(commodity.history()->last_lookup); DEBUG_PRINT_("pricing_leeway is " << pricing_leeway); - if ((commodity.history && - std::difftime(now, commodity.history->last_lookup) < pricing_leeway) || + if ((commodity.history() && + std::difftime(now, commodity.history()->last_lookup) < pricing_leeway) || std::difftime(now, last) < pricing_leeway || (price && std::difftime(moment, date) > 0 && std::difftime(moment, date) <= pricing_leeway)) @@ -61,7 +61,7 @@ void quotes_by_script::operator()(commodity_t& commodity, price.parse(buf); commodity.add_price(now, price); - commodity.history->last_lookup = now; + commodity.history()->last_lookup = now; cache_dirty = true; if (price && ! price_db.empty()) { |