summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-03 08:12:28 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-05-04 20:32:21 (GMT)
commitbe6664c208c65e01dc175ae4d27e7fc18c28c97e (patch)
tree8fdfd15921c8b7d9036c882a13b80676d5c7d1e0 /Source/cmMakefile.cxx
parentde211686122166e7485a98fd027bd1d32fda40b0 (diff)
downloadCMake-be6664c208c65e01dc175ae4d27e7fc18c28c97e.zip
CMake-be6664c208c65e01dc175ae4d27e7fc18c28c97e.tar.gz
CMake-be6664c208c65e01dc175ae4d27e7fc18c28c97e.tar.bz2
cmPolicies: Implement abstraction for PolicyMap.
Hide the detail that it is a std::map.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 29d891c..3befbdd 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -569,7 +569,7 @@ cmMakefile::IncludeScope::~IncludeScope()
// one we pushed above. If the entry is empty, then the included
// script did not set any policies that might affect the includer so
// we do not need to enforce the policy.
- if(this->CheckCMP0011 && this->Makefile->PolicyStack.back().empty())
+ if(this->CheckCMP0011 && this->Makefile->PolicyStack.back().IsEmpty())
{
this->CheckCMP0011 = false;
}
@@ -4772,10 +4772,9 @@ cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id) const
for(PolicyStackType::const_reverse_iterator psi = this->PolicyStack.rbegin();
psi != this->PolicyStack.rend(); ++psi)
{
- PolicyStackEntry::const_iterator pse = psi->find(id);
- if(pse != psi->end())
+ if(psi->IsDefined(id))
{
- return pse->second;
+ return psi->Get(id);
}
}
@@ -4840,7 +4839,7 @@ bool cmMakefile::SetPolicy(cmPolicies::PolicyID id,
for(PolicyStackType::reverse_iterator psi = this->PolicyStack.rbegin();
previous_was_weak && psi != this->PolicyStack.rend(); ++psi)
{
- (*psi)[id] = status;
+ psi->Set(id, status);
previous_was_weak = psi->Weak;
}
@@ -4960,7 +4959,7 @@ void cmMakefile::RecordPolicies(cmPolicies::PolicyMap& pm)
for(PolicyID pid = cmPolicies::CMP0000;
pid != cmPolicies::CMPCOUNT; pid = PolicyID(pid+1))
{
- pm[pid] = this->GetPolicyStatus(pid);
+ pm.Set(pid, this->GetPolicyStatus(pid));
}
}