summaryrefslogtreecommitdiff
path: root/src/ServerStatMan.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-10-18 12:31:07 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-10-18 12:31:07 +0000
commitc8d34a46bee7bcc2f377dd1ba57f61b1b8108ffc (patch)
tree564c707b7aa2703f5f509eb4db4f70c94b7e63fc /src/ServerStatMan.cc
parent1a7064f6f67564ede3f31bb300caebbeb61c6f66 (diff)
2009-10-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Replaced Util::slice() with split() * src/AbstractCommand.cc * src/CookieParser.cc * src/File.cc * src/HttpHeaderProcessor.cc * src/HttpRequest.cc * src/Metalink2RequestGroup.cc * src/MetalinkParserController.cc * src/Netrc.cc * src/NsCookieParser.cc * src/ParameterizedStringParser.cc * src/ServerStatMan.cc * src/UriListParser.cc * src/Util.cc * src/Util.h * src/bittorrent_helper.cc * test/UtilTest.cc
Diffstat (limited to 'src/ServerStatMan.cc')
-rw-r--r--src/ServerStatMan.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ServerStatMan.cc b/src/ServerStatMan.cc
index 8948fa2c..f8422d7a 100644
--- a/src/ServerStatMan.cc
+++ b/src/ServerStatMan.cc
@@ -38,6 +38,7 @@
#include <ostream>
#include <iterator>
#include <map>
+#include <vector>
#include "ServerStat.h"
#include "Util.h"
@@ -101,10 +102,10 @@ bool ServerStatMan::load(std::istream& in)
if(line.empty()) {
continue;
}
- std::deque<std::string> items;
- Util::slice(items, line, ',');
+ std::vector<std::string> items;
+ split(line, std::back_inserter(items), ",");
std::map<std::string, std::string> m;
- for(std::deque<std::string>::const_iterator i = items.begin();
+ for(std::vector<std::string>::const_iterator i = items.begin();
i != items.end(); ++i) {
std::pair<std::string, std::string> p = Util::split(*i, "=");
Util::trimSelf(p.first);