cmTarget: Use a simpler delete algorithm.

This way, the methods can be moved without requiring a local algorithm.

The containers use automatic storage.
This commit is contained in:
Stephen Kelly 2015-08-04 23:16:12 +02:00
parent 197f4de110
commit 29886ce764
1 changed files with 5 additions and 13 deletions

View File

@ -190,14 +190,6 @@ public:
cmLinkImplItem cmTargetInternals::TargetPropertyEntry::NoLinkImplItem; cmLinkImplItem cmTargetInternals::TargetPropertyEntry::NoLinkImplItem;
//----------------------------------------------------------------------------
static void deleteAndClear(
std::vector<cmTargetInternals::TargetPropertyEntry*> &entries)
{
cmDeleteAll(entries);
entries.clear();
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
cmTargetInternals::~cmTargetInternals() cmTargetInternals::~cmTargetInternals()
{ {
@ -810,7 +802,7 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files,
this->LinkImplementationLanguageIsContextDependent = false; this->LinkImplementationLanguageIsContextDependent = false;
} }
deleteAndClear(linkInterfaceSourcesEntries); cmDeleteAll(linkInterfaceSourcesEntries);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -2172,7 +2164,7 @@ cmTarget::GetIncludeDirectories(const std::string& config,
debugIncludes, debugIncludes,
language); language);
deleteAndClear(linkInterfaceIncludeDirectoriesEntries); cmDeleteAll(linkInterfaceIncludeDirectoriesEntries);
return includes; return includes;
} }
@ -2293,7 +2285,7 @@ void cmTarget::GetCompileOptions(std::vector<std::string> &result,
debugOptions, debugOptions,
language); language);
deleteAndClear(linkInterfaceCompileOptionsEntries); cmDeleteAll(linkInterfaceCompileOptionsEntries);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -2395,7 +2387,7 @@ void cmTarget::GetCompileDefinitions(std::vector<std::string> &list,
debugDefines, debugDefines,
language); language);
deleteAndClear(linkInterfaceCompileDefinitionsEntries); cmDeleteAll(linkInterfaceCompileDefinitionsEntries);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -2462,7 +2454,7 @@ void cmTarget::GetCompileFeatures(std::vector<std::string> &result,
config, config,
debugFeatures); debugFeatures);
deleteAndClear(linkInterfaceCompileFeaturesEntries); cmDeleteAll(linkInterfaceCompileFeaturesEntries);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------