summaryrefslogtreecommitdiff
path: root/src/ParameterizedStringParser.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-11-22 11:17:35 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-11-22 11:17:35 +0000
commit7436490f75e4e7941ec5e70316c3e5c9e91405cf (patch)
treec8c8ce53ee2c24a410e3efa6b4ab73c6d444e157 /src/ParameterizedStringParser.cc
parent1fed0c0cb09aa70da2b02dea9742ff8dd59636be (diff)
2007-11-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Replaced strtol with Util::parseInt * src/ChunkedEncoding.cc * src/HttpConnection.cc * src/CookieBoxFactory.cc * src/ParameterizedStringParser.cc * src/Util.cc * test/UtilTest.cc * test/OptionHandlerTest.cc * src/Request.cc Throw exception when empty string is given. The message for exception changed. * src/Util.cc (parseInt)(parseLLInt) * src/message.h
Diffstat (limited to 'src/ParameterizedStringParser.cc')
-rw-r--r--src/ParameterizedStringParser.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ParameterizedStringParser.cc b/src/ParameterizedStringParser.cc
index 4eef3574..409f5847 100644
--- a/src/ParameterizedStringParser.cc
+++ b/src/ParameterizedStringParser.cc
@@ -111,7 +111,7 @@ PStringDatumHandle ParameterizedStringParser::createLoop(const string& src,
if(colonIndex != string::npos) {
string stepStr = loopStr.substr(colonIndex+1);
if(Util::isNumber(stepStr)) {
- step = strtol(stepStr.c_str(), 0, 10);
+ step = Util::parseInt(stepStr);
} else {
throw new FatalException("A step count must be a number.");
}
@@ -126,8 +126,8 @@ PStringDatumHandle ParameterizedStringParser::createLoop(const string& src,
int32_t end;
if(Util::isNumber(range.first) && Util::isNumber(range.second)) {
nd = new FixedWidthNumberDecorator(range.first.size());
- start = strtol(range.first.c_str(), 0, 10);
- end = strtol(range.second.c_str(), 0, 10);
+ start = Util::parseInt(range.first);
+ end = Util::parseInt(range.second);
} else if(Util::isLowercase(range.first) && Util::isLowercase(range.second)) {
nd = new AlphaNumberDecorator(range.first.size());
start = Util::alphaToNum(range.first);