summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-01-22 13:58:58 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-01-22 14:16:40 (GMT)
commitd6d4eaac0659b1efea785888f2aab759a1b6b557 (patch)
treed3a738067f2ffb39ffb28e0be029bd927350df1d
parent2a6e56e078666a48d3e34b36c1500d44c429ecf0 (diff)
downloadCMake-d6d4eaac0659b1efea785888f2aab759a1b6b557.zip
CMake-d6d4eaac0659b1efea785888f2aab759a1b6b557.tar.gz
CMake-d6d4eaac0659b1efea785888f2aab759a1b6b557.tar.bz2
cmMakefile: Constify policies accessors.
-rw-r--r--Source/cmMakefile.cxx8
-rw-r--r--Source/cmMakefile.h7
2 files changed, 8 insertions, 7 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 6266f82..99aad51 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4287,7 +4287,7 @@ std::vector<cmSourceFile*> cmMakefile::GetQtUiFilesWithOptions() const
//----------------------------------------------------------------------------
cmPolicies::PolicyStatus
-cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id)
+cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id) const
{
// Get the current setting of the policy.
cmPolicies::PolicyStatus cur = this->GetPolicyStatusInternal(id);
@@ -4315,10 +4315,10 @@ cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id)
//----------------------------------------------------------------------------
cmPolicies::PolicyStatus
-cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id)
+cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id) const
{
// Is the policy set in our stack?
- for(PolicyStackType::reverse_iterator psi = this->PolicyStack.rbegin();
+ for(PolicyStackType::const_reverse_iterator psi = this->PolicyStack.rbegin();
psi != this->PolicyStack.rend(); ++psi)
{
PolicyStackEntry::const_iterator pse = psi->find(id);
@@ -4468,7 +4468,7 @@ bool cmMakefile::SetPolicyVersion(const char *version)
ApplyPolicyVersion(this,version);
}
-cmPolicies *cmMakefile::GetPolicies()
+cmPolicies *cmMakefile::GetPolicies() const
{
if (!this->GetCMakeInstance())
{
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 4c7341e..1e90122 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -356,7 +356,7 @@ public:
*/
bool SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status);
bool SetPolicy(const char *id, cmPolicies::PolicyStatus status);
- cmPolicies::PolicyStatus GetPolicyStatus(cmPolicies::PolicyID id);
+ cmPolicies::PolicyStatus GetPolicyStatus(cmPolicies::PolicyID id) const;
bool SetPolicyVersion(const char *version);
void RecordPolicies(cmPolicies::PolicyMap& pm);
//@}
@@ -379,7 +379,7 @@ public:
/**
* Get the Policies Instance
*/
- cmPolicies *GetPolicies();
+ cmPolicies *GetPolicies() const;
/**
* Add an auxiliary directory to the build.
@@ -1031,7 +1031,8 @@ private:
typedef std::vector<PolicyStackEntry> PolicyStackType;
PolicyStackType PolicyStack;
std::vector<PolicyStackType::size_type> PolicyBarriers;
- cmPolicies::PolicyStatus GetPolicyStatusInternal(cmPolicies::PolicyID id);
+ cmPolicies::PolicyStatus
+ GetPolicyStatusInternal(cmPolicies::PolicyID id) const;
bool CheckCMP0000;