Use the cmDeleteAll algorithm instead of trivial raw loops.

This commit is contained in:
Stephen Kelly
2015-01-04 13:33:16 +01:00
parent abb4a6781f
commit 4a6e795b0c
17 changed files with 30 additions and 171 deletions

View File

@@ -23,16 +23,8 @@ cmFileLockPool::cmFileLockPool()
cmFileLockPool::~cmFileLockPool()
{
for (It i = this->FunctionScopes.begin();
i != this->FunctionScopes.end(); ++i)
{
delete *i;
}
for (It i = this->FileScopes.begin(); i != this->FileScopes.end(); ++i)
{
delete *i;
}
cmDeleteAll(this->FunctionScopes);
cmDeleteAll(this->FileScopes);
}
void cmFileLockPool::PushFunctionScope()
@@ -148,10 +140,7 @@ cmFileLockPool::ScopePool::ScopePool()
cmFileLockPool::ScopePool::~ScopePool()
{
for (It i = this->Locks.begin(); i != this->Locks.end(); ++i)
{
delete *i;
}
cmDeleteAll(this->Locks);
}
cmFileLockResult cmFileLockPool::ScopePool::Lock(