From 29886ce76482a8c857841015b58d1e91a9ee5c8e Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 4 Aug 2015 23:16:12 +0200 Subject: [PATCH] cmTarget: Use a simpler delete algorithm. This way, the methods can be moved without requiring a local algorithm. The containers use automatic storage. --- Source/cmTarget.cxx | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 1277fc2c2..d3170e4ae 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -190,14 +190,6 @@ public: cmLinkImplItem cmTargetInternals::TargetPropertyEntry::NoLinkImplItem; -//---------------------------------------------------------------------------- -static void deleteAndClear( - std::vector &entries) -{ - cmDeleteAll(entries); - entries.clear(); -} - //---------------------------------------------------------------------------- cmTargetInternals::~cmTargetInternals() { @@ -810,7 +802,7 @@ void cmTarget::GetSourceFiles(std::vector &files, this->LinkImplementationLanguageIsContextDependent = false; } - deleteAndClear(linkInterfaceSourcesEntries); + cmDeleteAll(linkInterfaceSourcesEntries); } //---------------------------------------------------------------------------- @@ -2172,7 +2164,7 @@ cmTarget::GetIncludeDirectories(const std::string& config, debugIncludes, language); - deleteAndClear(linkInterfaceIncludeDirectoriesEntries); + cmDeleteAll(linkInterfaceIncludeDirectoriesEntries); return includes; } @@ -2293,7 +2285,7 @@ void cmTarget::GetCompileOptions(std::vector &result, debugOptions, language); - deleteAndClear(linkInterfaceCompileOptionsEntries); + cmDeleteAll(linkInterfaceCompileOptionsEntries); } //---------------------------------------------------------------------------- @@ -2395,7 +2387,7 @@ void cmTarget::GetCompileDefinitions(std::vector &list, debugDefines, language); - deleteAndClear(linkInterfaceCompileDefinitionsEntries); + cmDeleteAll(linkInterfaceCompileDefinitionsEntries); } //---------------------------------------------------------------------------- @@ -2462,7 +2454,7 @@ void cmTarget::GetCompileFeatures(std::vector &result, config, debugFeatures); - deleteAndClear(linkInterfaceCompileFeaturesEntries); + cmDeleteAll(linkInterfaceCompileFeaturesEntries); } //----------------------------------------------------------------------------