summaryrefslogtreecommitdiff
path: root/src/ServerStatMan.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-11-12 01:06:52 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-11-12 01:06:52 +0900
commit2f4393d17c7120912ad7b2b820b46124010a5a5e (patch)
tree78c0e632175fc4c9b61d08c62b46a905cb4c853d /src/ServerStatMan.cc
parent226480ad605cb9f7c4b5dbb0167f3fd67c8672ce (diff)
Rewritten parse*Int
Diffstat (limited to 'src/ServerStatMan.cc')
-rw-r--r--src/ServerStatMan.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ServerStatMan.cc b/src/ServerStatMan.cc
index 2c4b9f76..de00165a 100644
--- a/src/ServerStatMan.cc
+++ b/src/ServerStatMan.cc
@@ -171,25 +171,24 @@ bool ServerStatMan::load(const std::string& filename)
SharedHandle<ServerStat> sstat(new ServerStat(m[S_HOST], m[S_PROTOCOL]));
try {
const std::string& dlSpeed = m[S_DL_SPEED];
- sstat->setDownloadSpeed(util::parseUInt(dlSpeed.begin(), dlSpeed.end()));
+ sstat->setDownloadSpeed(util::parseUInt(dlSpeed));
// Old serverstat file doesn't contains SC_AVG_SPEED
if(m.find(S_SC_AVG_SPEED) != m.end()) {
const std::string& s = m[S_SC_AVG_SPEED];
- sstat->setSingleConnectionAvgSpeed(util::parseUInt(s.begin(), s.end()));
+ sstat->setSingleConnectionAvgSpeed(util::parseUInt(s));
}
// Old serverstat file doesn't contains MC_AVG_SPEED
if(m.find(S_MC_AVG_SPEED) != m.end()) {
const std::string& s = m[S_MC_AVG_SPEED];
- sstat->setMultiConnectionAvgSpeed(util::parseUInt(s.begin(), s.end()));
+ sstat->setMultiConnectionAvgSpeed(util::parseUInt(s));
}
// Old serverstat file doesn't contains COUNTER_SPEED
if(m.find(S_COUNTER) != m.end()) {
const std::string& s = m[S_COUNTER];
- sstat->setCounter(util::parseUInt(s.begin(), s.end()));
+ sstat->setCounter(util::parseUInt(s));
}
const std::string& lastUpdated = m[S_LAST_UPDATED];
- sstat->setLastUpdated
- (Time(util::parseInt(lastUpdated.begin(), lastUpdated.end())));
+ sstat->setLastUpdated(Time(util::parseInt(lastUpdated)));
sstat->setStatus(m[S_STATUS]);
add(sstat);
} catch(RecoverableException& e) {