Refactoring; use range for loop

This commit is contained in:
Daniel Marjamäki 2019-04-07 11:58:42 +02:00
parent 83106d5827
commit 3701db96a3
1 changed files with 2 additions and 2 deletions

View File

@ -36,8 +36,8 @@ void ImportProject::ignorePaths(const std::vector<std::string> &ipaths)
{ {
for (std::list<FileSettings>::iterator it = fileSettings.begin(); it != fileSettings.end();) { for (std::list<FileSettings>::iterator it = fileSettings.begin(); it != fileSettings.end();) {
bool ignore = false; bool ignore = false;
for (std::size_t i = 0; i < ipaths.size(); ++i) { for (const std::string &i : ipaths) {
if (it->filename.size() > ipaths[i].size() && it->filename.compare(0,ipaths[i].size(),ipaths[i])==0) { if (it->filename.size() > i.size() && it->filename.compare(0,i.size(),i)==0) {
ignore = true; ignore = true;
break; break;
} }