summaryrefslogtreecommitdiff
path: root/src/cookie_helper.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-11-03 18:51:31 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-11-03 18:51:31 +0900
commit9bb914b76e61dfed6044afee529eb92344bbca7a (patch)
tree016f9b4f6cdd1449398d05d6ce469b07463fa28c /src/cookie_helper.cc
parent6ef91d60b34a2a93b397b6db4daabfe8017d31fb (diff)
Changed parse*Int functions so that it accepts iterators.
Diffstat (limited to 'src/cookie_helper.cc')
-rw-r--r--src/cookie_helper.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/cookie_helper.cc b/src/cookie_helper.cc
index f98175c9..b30e309a 100644
--- a/src/cookie_helper.cc
+++ b/src/cookie_helper.cc
@@ -117,9 +117,9 @@ bool parseDate
goto NOT_TIME;
}
foundTime = true;
- hour = util::parseInt(std::string((*i).begin(), hEnd));
- minute = util::parseInt(std::string(hEnd+1, mEnd));
- second = util::parseInt(std::string(mEnd+1, sEnd));
+ hour = util::parseInt((*i).begin(), hEnd);
+ minute = util::parseInt(hEnd+1, mEnd);
+ second = util::parseInt(mEnd+1, sEnd);
continue;
NOT_TIME:
;
@@ -129,7 +129,7 @@ bool parseDate
size_t len = std::distance((*i).begin(), j);
if(1 <= len && len <= 2) {
foundDayOfMonth = true;
- dayOfMonth = util::parseInt(std::string((*i).begin(), j));
+ dayOfMonth = util::parseInt((*i).begin(), j);
continue;
}
}
@@ -154,7 +154,7 @@ bool parseDate
size_t len = std::distance((*i).begin(), j);
if(1 <= len && len <= 4) {
foundYear = true;
- year = util::parseInt(std::string((*i).begin(), j));
+ year = util::parseInt((*i).begin(), j);
continue;
}
}
@@ -273,8 +273,7 @@ bool parse
}
}
int64_t delta;
- if(util::parseLLIntNoThrow(delta,
- std::string(attrp.first, attrp.second))) {
+ if(util::parseLLIntNoThrow(delta, attrp.first, attrp.second)) {
foundMaxAge = true;
if(delta <= 0) {
maxAge = 0;