diff options
Diffstat (limited to 'quotes.cc')
-rw-r--r-- | quotes.cc | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -9,7 +9,7 @@ namespace ledger { -void quotes_by_script::operator()(commodity_t& commodity, +void quotes_by_script::operator()(commodity_base_t& commodity, const std::time_t moment, const std::time_t date, const std::time_t last, @@ -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()) { |