summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-01-21 16:09:14 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-01-22 14:16:40 (GMT)
commite68a3eadfffbdbaa00b735330aac2190583d21c1 (patch)
treed875f28460f359492efa70f38aadec1f2eda8905
parentb629240236c1212e550d2040f228344d0327e665 (diff)
downloadCMake-e68a3eadfffbdbaa00b735330aac2190583d21c1.zip
CMake-e68a3eadfffbdbaa00b735330aac2190583d21c1.tar.gz
CMake-e68a3eadfffbdbaa00b735330aac2190583d21c1.tar.bz2
cmSourceFile: Use a const cmMakefile.
-rw-r--r--Source/cmSourceFile.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index ec98c2c..23422a2 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -142,7 +142,7 @@ bool cmSourceFile::FindFullPath(std::string* error)
}
// The file is not generated. It must exist on disk.
- cmMakefile* mf = this->Location.GetMakefile();
+ cmMakefile const* mf = this->Location.GetMakefile();
const char* tryDirs[3] = {0, 0, 0};
if(this->Location.DirectoryIsAmbiguous())
{
@@ -264,7 +264,7 @@ void cmSourceFile::CheckExtension()
void cmSourceFile::CheckLanguage(std::string const& ext)
{
// Try to identify the source file language from the extension.
- cmMakefile* mf = this->Location.GetMakefile();
+ cmMakefile const* mf = this->Location.GetMakefile();
cmGlobalGenerator* gg = mf->GetLocalGenerator()->GetGlobalGenerator();
if(const char* l = gg->GetLanguageFromExtension(ext.c_str()))
{
@@ -292,10 +292,10 @@ void cmSourceFile::SetProperty(const char* prop, const char* value)
cmSystemTools::GetFilenameLastExtension(this->Location.GetName());
if (ext == ".ui")
{
- cmMakefile* mf = this->Location.GetMakefile();
+ cmMakefile const* mf = this->Location.GetMakefile();
if (strcmp(prop, "AUTOUIC_OPTIONS") == 0)
{
- mf->AddQtUiFileWithOptions(this);
+ const_cast<cmMakefile*>(mf)->AddQtUiFileWithOptions(this);
}
}
}
@@ -360,7 +360,7 @@ const char* cmSourceFile::GetProperty(const char* prop) const
this->Properties.GetPropertyValue(prop, cmProperty::SOURCE_FILE, chain);
if (chain)
{
- cmMakefile* mf = this->Location.GetMakefile();
+ cmMakefile const* mf = this->Location.GetMakefile();
return mf->GetProperty(prop,cmProperty::SOURCE_FILE);
}