Constification and minimal performance improvements
[libi2ncommon] / src / stringfunc.cpp
index b3fb22f..8f0464a 100644 (file)
@@ -753,7 +753,7 @@ std::string strip_html_tags(const std::string &input)
 
    string output;
    vector<pair<string,bool> >::const_iterator token, tokens_end = tokenized.end();
-   for (token = tokenized.begin(); token != tokens_end; token++)
+   for (token = tokenized.begin(); token != tokens_end; ++token)
       if (!token->second)
          output += token->first;
 
@@ -770,7 +770,7 @@ string smart_html_entities(const std::string &input)
 
    string output;
    vector<pair<string,bool> >::const_iterator token, tokens_end = tokenized.end();
-   for (token = tokenized.begin(); token != tokens_end; token++)
+   for (token = tokenized.begin(); token != tokens_end; ++token)
    {
       // keep HTML tags as they are
       if (token->second)
@@ -1100,7 +1100,7 @@ string escape_shellarg(const string &input)
 {
    string output = "'";
    string::const_iterator it, it_end = input.end();
-   for (it = input.begin(); it != it_end; it++)
+   for (it = input.begin(); it != it_end; ++it)
    {
       if ( (*it) == '\'')
          output += "'\\'";