summaryrefslogtreecommitdiff
path: root/quotes.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-20 02:14:53 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:28 -0400
commitb84f676946941df6f7e8476d77d1db0cbe7736c5 (patch)
tree9ee7c7a2d3b7496b38ad127519210adfeced2241 /quotes.cc
parent539370ff1b37772e9f11439f652ffd3583beeedb (diff)
downloadfork-ledger-b84f676946941df6f7e8476d77d1db0cbe7736c5.tar.gz
fork-ledger-b84f676946941df6f7e8476d77d1db0cbe7736c5.tar.bz2
fork-ledger-b84f676946941df6f7e8476d77d1db0cbe7736c5.zip
Did some optimization and memory cleanup
Diffstat (limited to 'quotes.cc')
-rw-r--r--quotes.cc9
1 files changed, 4 insertions, 5 deletions
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 + "\")");
}