Update Project.cpp

This commit is contained in:
Jack Andersen 2015-06-13 10:10:37 -10:00
parent 4b13e9da9d
commit a3bde58262
1 changed files with 10 additions and 4 deletions

View File

@ -95,11 +95,14 @@ void Project::ConfigFile::removeLine(const std::string& refLine)
throw HECL::Exception(_S("Project::ConfigFile::lockAndRead not yet called")); throw HECL::Exception(_S("Project::ConfigFile::lockAndRead not yet called"));
for (auto it = m_lines.begin(); for (auto it = m_lines.begin();
it != m_lines.end(); it != m_lines.end();)
++it)
{ {
if (!(*it).compare(refLine)) if (!(*it).compare(refLine))
{
it = m_lines.erase(it); it = m_lines.erase(it);
continue;
}
++it;
} }
} }
@ -233,11 +236,14 @@ bool Project::removePaths(const std::vector<ProjectPath>& paths, bool recursive)
{ {
std::string recursiveBase = path.getRelativePathUTF8(); std::string recursiveBase = path.getRelativePathUTF8();
for (auto it = existingPaths.begin(); for (auto it = existingPaths.begin();
it != existingPaths.end(); it != existingPaths.end())
++it)
{ {
if (!(*it).compare(0, recursiveBase.size(), recursiveBase)) if (!(*it).compare(0, recursiveBase.size(), recursiveBase))
{
it = existingPaths.erase(it); it = existingPaths.erase(it);
continue;
}
++it;
} }
} }
} }