summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-01-21 14:16:43 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-01-22 14:16:40 (GMT)
commitfe8b0330ebb4b3347e130e8a556ec2a4edfada93 (patch)
tree1fb4274ebdc48abf7fa795a0b600fc446d8a15a6 /Source/cmMakefile.cxx
parente68a3eadfffbdbaa00b735330aac2190583d21c1 (diff)
downloadCMake-fe8b0330ebb4b3347e130e8a556ec2a4edfada93.zip
CMake-fe8b0330ebb4b3347e130e8a556ec2a4edfada93.tar.gz
CMake-fe8b0330ebb4b3347e130e8a556ec2a4edfada93.tar.bz2
cmMakefile: Constify some cmSourceGroup related code.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 6b18c06..5a3e721 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2114,19 +2114,20 @@ cmSourceFile *cmMakefile::GetSourceFileWithOutput(const char *cname)
}
#if defined(CMAKE_BUILD_WITH_CMAKE)
-cmSourceGroup* cmMakefile::GetSourceGroup(const std::vector<std::string>&name)
+cmSourceGroup*
+cmMakefile::GetSourceGroup(const std::vector<std::string>&name) const
{
cmSourceGroup* sg = 0;
// first look for source group starting with the same as the one we wants
- for (std::vector<cmSourceGroup>::iterator sgIt = this->SourceGroups.begin();
- sgIt != this->SourceGroups.end(); ++sgIt)
-
+ for (std::vector<cmSourceGroup>::const_iterator
+ sgIt = this->SourceGroups.begin();
+ sgIt != this->SourceGroups.end(); ++sgIt)
{
std::string sgName = sgIt->GetName();
if(sgName == name[0])
{
- sg = &(*sgIt);
+ sg = const_cast<cmSourceGroup*>(&(*sgIt));
break;
}
}