summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-02-03 16:11:13 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-02-03 16:11:13 (GMT)
commit6e43138c3fade64723859510235625af57a031fc (patch)
tree00ea77f9263e61d84f0b45ee5104fbfc3690c10f
parentcdadec9f246acb91f1e11e4e8627e2097985d3b2 (diff)
parentf054201d12fa385f48abd967840c0d92595ca058 (diff)
downloadCMake-6e43138c3fade64723859510235625af57a031fc.zip
CMake-6e43138c3fade64723859510235625af57a031fc.tar.gz
CMake-6e43138c3fade64723859510235625af57a031fc.tar.bz2
Merge topic 'constify'
f054201d cmMakefile: Return containers by const reference. d1ac6ffd cmMakefile: Fix minor indentation inconsistency.
-rw-r--r--Source/cmMakefile.cxx14
-rw-r--r--Source/cmMakefile.h6
2 files changed, 10 insertions, 10 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 55a9d5c..f248c57 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1570,23 +1570,23 @@ void cmMakefile::InitializeFromParent()
// Initialize definitions with the closure of the parent scope.
this->Internal->VarStack.top() = parent->Internal->VarStack.top().Closure();
- const std::vector<cmValueWithOrigin> parentIncludes =
+ const std::vector<cmValueWithOrigin>& parentIncludes =
parent->GetIncludeDirectoriesEntries();
this->IncludeDirectoriesEntries.insert(this->IncludeDirectoriesEntries.end(),
- parentIncludes.begin(),
- parentIncludes.end());
+ parentIncludes.begin(),
+ parentIncludes.end());
- const std::vector<cmValueWithOrigin> parentOptions =
+ const std::vector<cmValueWithOrigin>& parentOptions =
parent->GetCompileOptionsEntries();
this->CompileOptionsEntries.insert(this->CompileOptionsEntries.end(),
parentOptions.begin(),
parentOptions.end());
- const std::vector<cmValueWithOrigin> parentDefines =
+ const std::vector<cmValueWithOrigin>& parentDefines =
parent->GetCompileDefinitionsEntries();
this->CompileDefinitionsEntries.insert(this->CompileDefinitionsEntries.end(),
- parentDefines.begin(),
- parentDefines.end());
+ parentDefines.begin(),
+ parentDefines.end());
this->SystemIncludeDirectories = parent->SystemIncludeDirectories;
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 66a33bb..45f3b9f 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -853,15 +853,15 @@ public:
/** Set whether or not to report a CMP0000 violation. */
void SetCheckCMP0000(bool b) { this->CheckCMP0000 = b; }
- std::vector<cmValueWithOrigin> GetIncludeDirectoriesEntries() const
+ const std::vector<cmValueWithOrigin>& GetIncludeDirectoriesEntries() const
{
return this->IncludeDirectoriesEntries;
}
- std::vector<cmValueWithOrigin> GetCompileOptionsEntries() const
+ const std::vector<cmValueWithOrigin>& GetCompileOptionsEntries() const
{
return this->CompileOptionsEntries;
}
- std::vector<cmValueWithOrigin> GetCompileDefinitionsEntries() const
+ const std::vector<cmValueWithOrigin>& GetCompileDefinitionsEntries() const
{
return this->CompileDefinitionsEntries;
}