use prefix ++ instead of postfix where available

This commit is contained in:
Andrzej Rybczak
2009-07-04 06:41:35 +02:00
parent 2eb913fe22
commit 9dab25e02c
26 changed files with 178 additions and 178 deletions

View File

@@ -182,9 +182,9 @@ void EscapeUnallowedChars(std::string &s)
{
static const std::string unallowed_chars = "\"*/:<>?\\|";
for (std::string::const_iterator it = unallowed_chars.begin(); it != unallowed_chars.end(); it++)
for (std::string::const_iterator it = unallowed_chars.begin(); it != unallowed_chars.end(); ++it)
{
for (size_t i = 0; i < s.length(); i++)
for (size_t i = 0; i < s.length(); ++i)
{
if (s[i] == *it)
{
@@ -209,7 +209,7 @@ void EscapeHtml(std::string &s)
s.replace(i, 6, "\"");
for (size_t i = s.find("&amp;"); i != std::string::npos; i = s.find("&amp;"))
s.replace(i, 5, "&");
for (size_t i = 0; i < s.length(); i++)
for (size_t i = 0; i < s.length(); ++i)
{
if (erase)
{