From 1b7c1982896dba1d38e1fe84ba9660996607f5f9 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 8 Feb 2008 15:53:45 +0000 Subject: 2008-02-08 Tatsuhiro Tsujikawa Removed "using namespace std;" from all sources. Appended std:: prefix to c++ standard classes. Included string.h where mem* function are used. --- src/BencodeVisitor.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/BencodeVisitor.cc') diff --git a/src/BencodeVisitor.cc b/src/BencodeVisitor.cc index b21585ee..f8fc0446 100644 --- a/src/BencodeVisitor.cc +++ b/src/BencodeVisitor.cc @@ -37,6 +37,10 @@ #include "List.h" #include "Dictionary.h" #include "Util.h" +#include +#include + +namespace aria2 { BencodeVisitor::BencodeVisitor() {} @@ -54,8 +58,8 @@ void BencodeVisitor::visit(const Data* d) void BencodeVisitor::visit(const List* l) { _bencodedData += "l"; - for_each(l->getList().begin(), l->getList().end(), - bind2nd(mem_fun(&MetaEntry::accept), this)); + std::for_each(l->getList().begin(), l->getList().end(), + std::bind2nd(std::mem_fun(&MetaEntry::accept), this)); _bencodedData += "e"; } @@ -63,7 +67,7 @@ void BencodeVisitor::visit(const Dictionary* d) { _bencodedData += "d"; - for(Order::const_iterator itr = d->getOrder().begin(); itr != d->getOrder().end(); ++itr) { + for(std::deque::const_iterator itr = d->getOrder().begin(); itr != d->getOrder().end(); ++itr) { _bencodedData += Util::itos((int32_t)(*itr).size()); _bencodedData += ":"; _bencodedData += *itr; @@ -82,3 +86,5 @@ void BencodeVisitor::visit(const MetaEntry* e) visit(reinterpret_cast(e)); } } + +} // namespace aria2 -- cgit