summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-01-22 15:56:39 (GMT)
committerBrad King <brad.king@kitware.com>2009-01-22 15:56:39 (GMT)
commit8997f4760a83efb270f3f9234a016451c0884fe2 (patch)
tree15d37251813671eed25ce679227c574458eb139f /Source/cmMakefile.cxx
parente8a0e90133da84e552efc1852f9f1e589b250ed3 (diff)
downloadCMake-8997f4760a83efb270f3f9234a016451c0884fe2.zip
CMake-8997f4760a83efb270f3f9234a016451c0884fe2.tar.gz
CMake-8997f4760a83efb270f3f9234a016451c0884fe2.tar.bz2
ENH: Refactor policy stack representation
This defines PolicyMap as a public member of cmPolicies. Its previous role as a policy stack entry is now called PolicyStackEntry and represented as a class to which more information can be added later.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 890f752..f9b40b1 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3599,11 +3599,10 @@ cmPolicies::PolicyStatus
cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id)
{
// Is the policy set in our stack?
- for(std::vector<PolicyMap>::reverse_iterator
- psi = this->PolicyStack.rbegin();
+ for(PolicyStackType::reverse_iterator psi = this->PolicyStack.rbegin();
psi != this->PolicyStack.rend(); ++psi)
{
- PolicyMap::const_iterator pse = psi->find(id);
+ PolicyStackEntry::const_iterator pse = psi->find(id);
if(pse != psi->end())
{
return pse->second;
@@ -3678,7 +3677,7 @@ bool cmMakefile::SetPolicy(cmPolicies::PolicyID id,
bool cmMakefile::PushPolicy()
{
// Allocate a new stack entry.
- this->PolicyStack.push_back(PolicyMap());
+ this->PolicyStack.push_back(PolicyStackEntry());
return true;
}