mirror of https://github.com/aria2/aria2
2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Code cleanup * src/cookie_helper.ccpull/1/head
parent
1875d7382f
commit
8f173868dc
|
@ -1,3 +1,8 @@
|
|||
2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Code cleanup
|
||||
* src/cookie_helper.cc
|
||||
|
||||
2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Replaced util::split(a,b,c) and util::split(a,b) with
|
||||
|
|
|
@ -222,10 +222,8 @@ bool parse
|
|||
bool httpOnly = false;
|
||||
|
||||
for(std::string::const_iterator i = nvEnd; i != end;) {
|
||||
std::string::const_iterator j = i;
|
||||
for(; j != end && *j != ';'; ++j);
|
||||
std::string::const_iterator eq = i;
|
||||
for(; eq != j && *eq != '='; ++eq);
|
||||
std::string::const_iterator j = std::find(i, end, ';');
|
||||
std::string::const_iterator eq = std::find(i, j, '=');
|
||||
std::string attrName = util::stripIter(i, eq);
|
||||
util::lowercase(attrName);
|
||||
std::string attrValue;
|
||||
|
@ -373,8 +371,7 @@ std::string reverseDomainLevel(const std::string& domain)
|
|||
std::string r;
|
||||
for(std::string::const_iterator i = domain.begin(), eoi = domain.end();
|
||||
i != eoi;) {
|
||||
std::string::const_iterator j = i;
|
||||
for(; j != eoi && *j != '.'; ++j);
|
||||
std::string::const_iterator j = std::find(i, eoi, '.');
|
||||
r.insert(r.begin(), '.');
|
||||
r.insert(r.begin(), i, j);
|
||||
i = j;
|
||||
|
|
Loading…
Reference in New Issue