summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-11-19 10:47:36 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-11-19 19:40:32 (GMT)
commit37554acf43f1a94f22b3b9fb8838d685ffa07194 (patch)
tree8159600851c4e2002085e3744139acdb725f803a /Source/cmMakefile.cxx
parent8841d738cc7be3f91e16d62e83c0cd7f2cb2f626 (diff)
downloadCMake-37554acf43f1a94f22b3b9fb8838d685ffa07194.zip
CMake-37554acf43f1a94f22b3b9fb8838d685ffa07194.tar.gz
CMake-37554acf43f1a94f22b3b9fb8838d685ffa07194.tar.bz2
cmMakefile: Make FindTarget const.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 4a2153d..6be1fdd 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3822,21 +3822,19 @@ const char* cmMakefile::GetFeature(const char* feature, const char* config)
return 0;
}
-cmTarget* cmMakefile::FindTarget(const char* name, bool excludeAliases)
+cmTarget* cmMakefile::FindTarget(const char* name, bool excludeAliases) const
{
if (!excludeAliases)
{
- std::map<std::string, cmTarget*>::iterator i
+ std::map<std::string, cmTarget*>::const_iterator i
= this->AliasTargets.find(name);
if (i != this->AliasTargets.end())
{
return i->second;
}
}
- cmTargets& tgts = this->GetTargets();
-
- cmTargets::iterator i = tgts.find ( name );
- if ( i != tgts.end() )
+ cmTargets::iterator i = this->Targets.find( name );
+ if ( i != this->Targets.end() )
{
return &i->second;
}