summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-10-18 19:28:45 (GMT)
committerStephen Kelly <steveire@gmail.com>2016-10-18 19:28:45 (GMT)
commit2dc409964858c96125948082a2c488bd573b8269 (patch)
treeaff5dfb5680952a4fe06e5d565e0a386a2da307f
parentcb40af5d6fa65dae9421280c05934eafc8a66165 (diff)
downloadCMake-2dc409964858c96125948082a2c488bd573b8269.zip
CMake-2dc409964858c96125948082a2c488bd573b8269.tar.gz
CMake-2dc409964858c96125948082a2c488bd573b8269.tar.bz2
cmState: Move PolicyStackEntry to separate namespace
-rw-r--r--Source/cmState.cxx19
-rw-r--r--Source/cmState.h4
2 files changed, 12 insertions, 11 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index c3e061b..080700e 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -29,9 +29,9 @@ struct cmStateDetail::SnapshotDataType
{
cmState::PositionType ScopeParent;
cmState::PositionType DirectoryParent;
- cmLinkedTree<cmState::PolicyStackEntry>::iterator Policies;
- cmLinkedTree<cmState::PolicyStackEntry>::iterator PolicyRoot;
- cmLinkedTree<cmState::PolicyStackEntry>::iterator PolicyScope;
+ cmLinkedTree<cmStateDetail::PolicyStackEntry>::iterator Policies;
+ cmLinkedTree<cmStateDetail::PolicyStackEntry>::iterator PolicyRoot;
+ cmLinkedTree<cmStateDetail::PolicyStackEntry>::iterator PolicyScope;
cmState::SnapshotType SnapshotType;
bool Keep;
cmLinkedTree<std::string>::iterator ExecutionListFile;
@@ -45,7 +45,7 @@ struct cmStateDetail::SnapshotDataType
std::vector<std::string>::size_type CompileOptionsPosition;
};
-struct cmState::PolicyStackEntry : public cmPolicies::PolicyMap
+struct cmStateDetail::PolicyStackEntry : public cmPolicies::PolicyMap
{
typedef cmPolicies::PolicyMap derived;
PolicyStackEntry(bool w = false)
@@ -1078,8 +1078,8 @@ cmState::Snapshot cmState::Snapshot::GetCallStackBottom() const
void cmState::Snapshot::PushPolicy(cmPolicies::PolicyMap entry, bool weak)
{
PositionType pos = this->Position;
- pos->Policies = this->State->PolicyStack.Push(pos->Policies,
- PolicyStackEntry(entry, weak));
+ pos->Policies = this->State->PolicyStack.Push(
+ pos->Policies, cmStateDetail::PolicyStackEntry(entry, weak));
}
bool cmState::Snapshot::PopPolicy()
@@ -1102,7 +1102,8 @@ void cmState::Snapshot::SetPolicy(cmPolicies::PolicyID id,
{
// Update the policy stack from the top to the top-most strong entry.
bool previous_was_weak = true;
- for (cmLinkedTree<PolicyStackEntry>::iterator psi = this->Position->Policies;
+ for (cmLinkedTree<cmStateDetail::PolicyStackEntry>::iterator psi =
+ this->Position->Policies;
previous_was_weak && psi != this->Position->PolicyRoot; ++psi) {
psi->Set(id, status);
previous_was_weak = psi->Weak;
@@ -1124,9 +1125,9 @@ cmPolicies::PolicyStatus cmState::Snapshot::GetPolicy(
while (true) {
assert(dir.IsValid());
- cmLinkedTree<PolicyStackEntry>::iterator leaf =
+ cmLinkedTree<cmStateDetail::PolicyStackEntry>::iterator leaf =
dir->DirectoryEnd->Policies;
- cmLinkedTree<PolicyStackEntry>::iterator root =
+ cmLinkedTree<cmStateDetail::PolicyStackEntry>::iterator root =
dir->DirectoryEnd->PolicyRoot;
for (; leaf != root; ++leaf) {
if (leaf->IsDefined(id)) {
diff --git a/Source/cmState.h b/Source/cmState.h
index d733469..34f9fd0 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -26,11 +26,11 @@ class cmPropertyDefinition;
namespace cmStateDetail {
struct BuildsystemDirectoryStateType;
struct SnapshotDataType;
+struct PolicyStackEntry;
}
class cmState
{
- struct PolicyStackEntry;
typedef cmLinkedTree<cmStateDetail::SnapshotDataType>::iterator PositionType;
friend class Snapshot;
friend struct cmStateDetail::BuildsystemDirectoryStateType;
@@ -341,7 +341,7 @@ private:
cmLinkedTree<std::string> ExecutionListFiles;
- cmLinkedTree<PolicyStackEntry> PolicyStack;
+ cmLinkedTree<cmStateDetail::PolicyStackEntry> PolicyStack;
cmLinkedTree<cmStateDetail::SnapshotDataType> SnapshotData;
cmLinkedTree<cmDefinitions> VarTree;