Constify cmGeneratorTarget access.

This commit is contained in:
Stephen Kelly 2013-12-10 15:44:39 +01:00
parent 9edee62f28
commit a54eeddaae
3 changed files with 4 additions and 3 deletions

View File

@ -104,7 +104,7 @@ struct cmStrictTargetComparison {
bool operator()(cmTarget const* t1, cmTarget const* t2) const; bool operator()(cmTarget const* t1, cmTarget const* t2) const;
}; };
typedef std::map<cmTarget*, typedef std::map<cmTarget const*,
cmGeneratorTarget*, cmGeneratorTarget*,
cmStrictTargetComparison> cmGeneratorTargetsType; cmStrictTargetComparison> cmGeneratorTargetsType;

View File

@ -1432,7 +1432,8 @@ void cmGlobalGenerator::ClearGeneratorMembers()
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
cmGeneratorTarget* cmGlobalGenerator::GetGeneratorTarget(cmTarget* t) const cmGeneratorTarget*
cmGlobalGenerator::GetGeneratorTarget(cmTarget const* t) const
{ {
cmGeneratorTargetsType::const_iterator ti = this->GeneratorTargets.find(t); cmGeneratorTargetsType::const_iterator ti = this->GeneratorTargets.find(t);
if(ti == this->GeneratorTargets.end()) if(ti == this->GeneratorTargets.end())

View File

@ -269,7 +269,7 @@ public:
TargetDependSet const& GetTargetDirectDepends(cmTarget const& target); TargetDependSet const& GetTargetDirectDepends(cmTarget const& target);
/** Get per-target generator information. */ /** Get per-target generator information. */
cmGeneratorTarget* GetGeneratorTarget(cmTarget*) const; cmGeneratorTarget* GetGeneratorTarget(cmTarget const*) const;
const std::map<cmStdString, std::vector<cmLocalGenerator*> >& GetProjectMap() const std::map<cmStdString, std::vector<cmLocalGenerator*> >& GetProjectMap()
const {return this->ProjectMap;} const {return this->ProjectMap;}