cmTarget: Drop 'head' argument from GetSourceFiles

No call sites need it to be anything but 'this'.
This commit is contained in:
Brad King 2014-07-10 16:07:31 -04:00
parent 4c763dd1f1
commit 4b8130b8de
2 changed files with 11 additions and 15 deletions

View File

@ -158,8 +158,8 @@ public:
typedef std::map<std::string, cmTarget::LinkClosure> LinkClosureMapType; typedef std::map<std::string, cmTarget::LinkClosure> LinkClosureMapType;
LinkClosureMapType LinkClosureMap; LinkClosureMapType LinkClosureMap;
typedef std::map<TargetConfigPair, std::vector<cmSourceFile*> > typedef std::map<std::string, std::vector<cmSourceFile*> >
SourceFilesMapType; SourceFilesMapType;
SourceFilesMapType SourceFilesMap; SourceFilesMapType SourceFilesMap;
std::set<cmLinkItem> UtilityItems; std::set<cmLinkItem> UtilityItems;
@ -707,8 +707,7 @@ static bool processSources(cmTarget const* tgt,
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmTarget::GetSourceFiles(std::vector<std::string> &files, void cmTarget::GetSourceFiles(std::vector<std::string> &files,
const std::string& config, const std::string& config) const
cmTarget const* head) const
{ {
assert(this->GetType() != INTERFACE_LIBRARY); assert(this->GetType() != INTERFACE_LIBRARY);
@ -772,7 +771,7 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files,
files, files,
uniqueSrcs, uniqueSrcs,
&dagChecker, &dagChecker,
head, this,
config, config,
debugSources); debugSources);
@ -789,7 +788,7 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files,
files, files,
uniqueSrcs, uniqueSrcs,
&dagChecker, &dagChecker,
head, this,
config, config,
debugSources); debugSources);
@ -868,12 +867,11 @@ cmTarget::GetConfigCommonSourceFiles(std::vector<cmSourceFile*>& files) const
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmTarget::GetSourceFiles(std::vector<cmSourceFile*> &files, void cmTarget::GetSourceFiles(std::vector<cmSourceFile*> &files,
const std::string& config, const std::string& config) const
cmTarget const* head) const
{ {
// Lookup any existing link implementation for this configuration. // Lookup any existing link implementation for this configuration.
TargetConfigPair key(head, cmSystemTools::UpperCase(config)); std::string key = cmSystemTools::UpperCase(config);
if(!this->LinkImplementationLanguageIsContextDependent) if(!this->LinkImplementationLanguageIsContextDependent)
{ {
@ -890,7 +888,7 @@ void cmTarget::GetSourceFiles(std::vector<cmSourceFile*> &files,
else else
{ {
std::vector<std::string> srcs; std::vector<std::string> srcs;
this->GetSourceFiles(srcs, config, head); this->GetSourceFiles(srcs, config);
std::set<cmSourceFile*> emitted; std::set<cmSourceFile*> emitted;
@ -5422,7 +5420,7 @@ void cmTarget::GetLanguages(std::set<std::string>& languages,
const std::string& config) const const std::string& config) const
{ {
std::vector<cmSourceFile*> sourceFiles; std::vector<cmSourceFile*> sourceFiles;
this->GetSourceFiles(sourceFiles, config, this); this->GetSourceFiles(sourceFiles, config);
for(std::vector<cmSourceFile*>::const_iterator for(std::vector<cmSourceFile*>::const_iterator
i = sourceFiles.begin(); i != sourceFiles.end(); ++i) i = sourceFiles.begin(); i != sourceFiles.end(); ++i)
{ {

View File

@ -161,8 +161,7 @@ public:
* Get the list of the source files used by this target * Get the list of the source files used by this target
*/ */
void GetSourceFiles(std::vector<cmSourceFile*> &files, void GetSourceFiles(std::vector<cmSourceFile*> &files,
const std::string& config, const std::string& config) const;
cmTarget const* head = 0) const;
bool GetConfigCommonSourceFiles(std::vector<cmSourceFile*>& files) const; bool GetConfigCommonSourceFiles(std::vector<cmSourceFile*>& files) const;
/** /**
@ -711,8 +710,7 @@ private:
bool contentOnly) const; bool contentOnly) const;
void GetSourceFiles(std::vector<std::string> &files, void GetSourceFiles(std::vector<std::string> &files,
const std::string& config, const std::string& config) const;
cmTarget const* head = 0) const;
private: private:
std::string Name; std::string Name;
std::vector<cmCustomCommand> PreBuildCommands; std::vector<cmCustomCommand> PreBuildCommands;