Turn loops into range-based form

and some things suggested by cppcheck and compiler warnings.
This commit is contained in:
Tillmann Karras
2014-02-12 16:00:34 +01:00
parent 2ff794d299
commit 404624bf0b
52 changed files with 199 additions and 230 deletions

View File

@ -79,7 +79,7 @@ public:
}
std::vector<SSysConfEntry>::iterator index = m_Entries.begin();
for (; index < m_Entries.end() - 1; index++)
for (; index < m_Entries.end() - 1; ++index)
{
if (strcmp(index->name, sectionName) == 0)
break;
@ -102,7 +102,7 @@ public:
}
std::vector<SSysConfEntry>::iterator index = m_Entries.begin();
for (; index < m_Entries.end() - 1; index++)
for (; index < m_Entries.end() - 1; ++index)
{
if (strcmp(index->name, sectionName) == 0)
break;
@ -122,7 +122,7 @@ public:
return false;
std::vector<SSysConfEntry>::iterator index = m_Entries.begin();
for (; index < m_Entries.end() - 1; index++)
for (; index < m_Entries.end() - 1; ++index)
{
if (strcmp(index->name, sectionName) == 0)
break;
@ -143,7 +143,7 @@ public:
return false;
std::vector<SSysConfEntry>::iterator index = m_Entries.begin();
for (; index < m_Entries.end() - 1; index++)
for (; index < m_Entries.end() - 1; ++index)
{
if (strcmp(index->name, sectionName) == 0)
break;