diff options
author | Brad King <brad.king@kitware.com> | 2015-01-19 14:43:25 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-01-19 14:43:25 (GMT) |
commit | 95d42840e88599ab1959f7531668e320a7c20fdf (patch) | |
tree | bdc0e55f563f6c63bebd0a027034529699db0c9c /Source/cmTarget.cxx | |
parent | a1fea841a92568c0bdc35e1c8c7a400b20459a96 (diff) | |
parent | 681d965df18fa55a9eaa615515015ac088ea0805 (diff) | |
download | CMake-95d42840e88599ab1959f7531668e320a7c20fdf.zip CMake-95d42840e88599ab1959f7531668e320a7c20fdf.tar.gz CMake-95d42840e88599ab1959f7531668e320a7c20fdf.tar.bz2 |
Merge topic 'delete-algorithm'
681d965d Use the cmDeleteAll algorithm for types derived from std::map.
4dc0c488 cmDeleteAll: Generalize deletion specialization for map types.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 8e060c4..8d0271a 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -539,12 +539,7 @@ void cmTarget::ClearLinkMaps() this->Internal->LinkInterfaceUsageRequirementsOnlyMap.clear(); this->Internal->LinkClosureMap.clear(); this->Internal->SourceFilesMap.clear(); - for (cmTargetLinkInformationMap::const_iterator it - = this->LinkInformation.begin(); - it != this->LinkInformation.end(); ++it) - { - delete it->second; - } + cmDeleteAll(this->LinkInformation); this->LinkInformation.clear(); } @@ -6874,10 +6869,7 @@ cmTargetLinkInformationMap //---------------------------------------------------------------------------- cmTargetLinkInformationMap::~cmTargetLinkInformationMap() { - for(derived::iterator i = this->begin(); i != this->end(); ++i) - { - delete i->second; - } + cmDeleteAll(*this); } //---------------------------------------------------------------------------- |