From 4b8130b8de223674d567bdff5e156b1bdc1d5c27 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 10 Jul 2014 16:07:31 -0400 Subject: cmTarget: Drop 'head' argument from GetSourceFiles No call sites need it to be anything but 'this'. --- Source/cmTarget.cxx | 20 +++++++++----------- Source/cmTarget.h | 6 ++---- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index e1ce4dd..5865c61 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -158,8 +158,8 @@ public: typedef std::map LinkClosureMapType; LinkClosureMapType LinkClosureMap; - typedef std::map > - SourceFilesMapType; + typedef std::map > + SourceFilesMapType; SourceFilesMapType SourceFilesMap; std::set UtilityItems; @@ -707,8 +707,7 @@ static bool processSources(cmTarget const* tgt, //---------------------------------------------------------------------------- void cmTarget::GetSourceFiles(std::vector &files, - const std::string& config, - cmTarget const* head) const + const std::string& config) const { assert(this->GetType() != INTERFACE_LIBRARY); @@ -772,7 +771,7 @@ void cmTarget::GetSourceFiles(std::vector &files, files, uniqueSrcs, &dagChecker, - head, + this, config, debugSources); @@ -789,7 +788,7 @@ void cmTarget::GetSourceFiles(std::vector &files, files, uniqueSrcs, &dagChecker, - head, + this, config, debugSources); @@ -868,12 +867,11 @@ cmTarget::GetConfigCommonSourceFiles(std::vector& files) const //---------------------------------------------------------------------------- void cmTarget::GetSourceFiles(std::vector &files, - const std::string& config, - cmTarget const* head) const + const std::string& config) const { // Lookup any existing link implementation for this configuration. - TargetConfigPair key(head, cmSystemTools::UpperCase(config)); + std::string key = cmSystemTools::UpperCase(config); if(!this->LinkImplementationLanguageIsContextDependent) { @@ -890,7 +888,7 @@ void cmTarget::GetSourceFiles(std::vector &files, else { std::vector srcs; - this->GetSourceFiles(srcs, config, head); + this->GetSourceFiles(srcs, config); std::set emitted; @@ -5422,7 +5420,7 @@ void cmTarget::GetLanguages(std::set& languages, const std::string& config) const { std::vector sourceFiles; - this->GetSourceFiles(sourceFiles, config, this); + this->GetSourceFiles(sourceFiles, config); for(std::vector::const_iterator i = sourceFiles.begin(); i != sourceFiles.end(); ++i) { diff --git a/Source/cmTarget.h b/Source/cmTarget.h index d5fb5e8..39a0667 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -161,8 +161,7 @@ public: * Get the list of the source files used by this target */ void GetSourceFiles(std::vector &files, - const std::string& config, - cmTarget const* head = 0) const; + const std::string& config) const; bool GetConfigCommonSourceFiles(std::vector& files) const; /** @@ -711,8 +710,7 @@ private: bool contentOnly) const; void GetSourceFiles(std::vector &files, - const std::string& config, - cmTarget const* head = 0) const; + const std::string& config) const; private: std::string Name; std::vector PreBuildCommands; -- cgit v0.12