diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2017-05-04 20:09:30 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2017-05-05 07:21:10 (GMT) |
commit | 7a0e239240ceb58230a11b64fe8c8a63d6854c30 (patch) | |
tree | 6c845cd6137e56d4828eebd38c803b812cacbd32 /Source | |
parent | 0e967e3b1dd8a705e304b4d94f1556249622d747 (diff) | |
download | CMake-7a0e239240ceb58230a11b64fe8c8a63d6854c30.zip CMake-7a0e239240ceb58230a11b64fe8c8a63d6854c30.tar.gz CMake-7a0e239240ceb58230a11b64fe8c8a63d6854c30.tar.bz2 |
cmFileMonitor: use cmDeleteAll
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmFileMonitor.cxx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Source/cmFileMonitor.cxx b/Source/cmFileMonitor.cxx index ed794c3..499ee84 100644 --- a/Source/cmFileMonitor.cxx +++ b/Source/cmFileMonitor.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFileMonitor.h" +#include "cmAlgorithms.h" #include "cmsys/SystemTools.hxx" #include <cassert> @@ -36,12 +37,7 @@ public: class cmVirtualDirectoryWatcher : public cmIBaseWatcher { public: - ~cmVirtualDirectoryWatcher() override - { - for (auto i : this->Children) { - delete i.second; - } - } + ~cmVirtualDirectoryWatcher() override { cmDeleteAll(this->Children); } cmIBaseWatcher* Find(const std::string& ps) { @@ -102,9 +98,7 @@ public: void Reset() { - for (auto c : this->Children) { - delete c.second; - } + cmDeleteAll(this->Children); this->Children.clear(); } |