diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-01-04 12:33:16 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-01-13 22:00:17 (GMT) |
commit | 4a6e795b0c5cdafbc78f12389ec20d6bc4f9ca34 (patch) | |
tree | b33cf1a4185ae6525c023a2dff210bf3449df197 /Source/cmFileLockPool.cxx | |
parent | abb4a6781f96b28e4c30014915f566dee9130db7 (diff) | |
download | CMake-4a6e795b0c5cdafbc78f12389ec20d6bc4f9ca34.zip CMake-4a6e795b0c5cdafbc78f12389ec20d6bc4f9ca34.tar.gz CMake-4a6e795b0c5cdafbc78f12389ec20d6bc4f9ca34.tar.bz2 |
Use the cmDeleteAll algorithm instead of trivial raw loops.
Diffstat (limited to 'Source/cmFileLockPool.cxx')
-rw-r--r-- | Source/cmFileLockPool.cxx | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/Source/cmFileLockPool.cxx b/Source/cmFileLockPool.cxx index 551a75a..cf8e9a9 100644 --- a/Source/cmFileLockPool.cxx +++ b/Source/cmFileLockPool.cxx @@ -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( |