From b84f676946941df6f7e8476d77d1db0cbe7736c5 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 20 Apr 2007 02:14:53 +0000 Subject: Did some optimization and memory cleanup --- quotes.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'quotes.cc') diff --git a/quotes.cc b/quotes.cc index d4f111da..6ae9f81b 100644 --- a/quotes.cc +++ b/quotes.cc @@ -32,8 +32,6 @@ void quotes_by_script::operator()(commodity_base_t& commodity, (price && moment > date && (moment - date) <= pricing_leeway)) return; - using namespace std; - DEBUG_PRINT_("downloading quote for symbol " << commodity.symbol); char buf[256]; @@ -65,9 +63,10 @@ void quotes_by_script::operator()(commodity_base_t& commodity, if (price && ! price_db.empty()) { #if defined(__GNUG__) && __GNUG__ < 3 - ofstream database(price_db.c_str(), ios::out | ios::app); + std::ofstream database(price_db.c_str(), ios::out | ios::app); #else - ofstream database(price_db.c_str(), ios_base::out | ios_base::app); + std::ofstream database(price_db.c_str(), + std::ios_base::out | std::ios_base::app); #endif #if 0 // jww (2007-04-18): Need to convert to local time and print @@ -77,7 +76,7 @@ void quotes_by_script::operator()(commodity_base_t& commodity, #endif } } else { - throw new error(std::string("Failed to download price for '") + + throw new error(string("Failed to download price for '") + commodity.symbol + "' (command: \"getquote " + commodity.symbol + "\")"); } -- cgit v1.2.3