diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-08-11 20:53:28 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-08-11 20:53:28 +0200 |
commit | f7f0d6c7560a8f71707e7852a512469147aa9f84 (patch) | |
tree | 5bec681b4e798a2b35bea180213df399c51920d9 /methods/http.cc | |
parent | dd6882853b4555a6113740afca417acbaa060043 (diff) |
cppcheck complains about some possible speed improvements which could be
done on the mirco-optimazation level, so lets fix them:
(performance) Possible inefficient checking for emptiness.
(performance) Prefer prefix ++/-- operators for non-primitive types.
Diffstat (limited to 'methods/http.cc')
-rw-r--r-- | methods/http.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/methods/http.cc b/methods/http.cc index 13f9cbe06..65a0cbbb7 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -402,10 +402,10 @@ ServerState::RunHeadersResult ServerState::RunHeaders() if (Debug == true) clog << Data; - for (string::const_iterator I = Data.begin(); I < Data.end(); I++) + for (string::const_iterator I = Data.begin(); I < Data.end(); ++I) { string::const_iterator J = I; - for (; J != Data.end() && *J != '\n' && *J != '\r';J++); + for (; J != Data.end() && *J != '\n' && *J != '\r'; ++J); if (HeaderLine(string(I,J)) == false) return RUN_HEADERS_PARSE_ERROR; I = J; @@ -1325,7 +1325,7 @@ int HttpMethod::Loop() StopRedirects = true; else { - for (StringVectorIterator I = R.begin(); I != R.end(); I++) + for (StringVectorIterator I = R.begin(); I != R.end(); ++I) if (Queue->Uri == *I) { R[0] = "STOP"; |