summaryrefslogtreecommitdiffstats
path: root/Source/cmPolicies.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-06-22 01:18:55 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-07-25 12:48:36 (GMT)
commit71e69fc93b9f1a0829d04b9e44107c92458efe20 (patch)
tree242ee964ba495918694ffd76874b1499cbece399 /Source/cmPolicies.cxx
parent84e18056668491d5a7e0068c9287455151a18197 (diff)
downloadCMake-71e69fc93b9f1a0829d04b9e44107c92458efe20.zip
CMake-71e69fc93b9f1a0829d04b9e44107c92458efe20.tar.gz
CMake-71e69fc93b9f1a0829d04b9e44107c92458efe20.tar.bz2
cmPolicies: Store only state that users can set.
cmPolicies::PolicyMap does not need to store the REQUIRED_ALWAYS or REQUIRED_IF_USED states as they are statically determined.
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r--Source/cmPolicies.cxx16
1 files changed, 1 insertions, 15 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 5026893..2a5ae1c 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -356,14 +356,6 @@ cmPolicies::PolicyMap::Get(cmPolicies::PolicyID id) const
{
status = cmPolicies::NEW;
}
- else if (this->Status[(POLICY_STATUS_COUNT * id) + REQUIRED_ALWAYS])
- {
- status = cmPolicies::REQUIRED_ALWAYS;
- }
- else if (this->Status[(POLICY_STATUS_COUNT * id) + REQUIRED_IF_USED])
- {
- status = cmPolicies::REQUIRED_IF_USED;
- }
return status;
}
@@ -373,19 +365,13 @@ void cmPolicies::PolicyMap::Set(cmPolicies::PolicyID id,
this->Status[(POLICY_STATUS_COUNT * id) + OLD] = (status == OLD);
this->Status[(POLICY_STATUS_COUNT * id) + WARN] = (status == WARN);
this->Status[(POLICY_STATUS_COUNT * id) + NEW] = (status == NEW);
- this->Status[(POLICY_STATUS_COUNT * id) + REQUIRED_ALWAYS] =
- (status == REQUIRED_ALWAYS);
- this->Status[(POLICY_STATUS_COUNT * id) + REQUIRED_IF_USED] =
- (status == REQUIRED_IF_USED);
}
bool cmPolicies::PolicyMap::IsDefined(cmPolicies::PolicyID id) const
{
return this->Status[(POLICY_STATUS_COUNT * id) + OLD]
|| this->Status[(POLICY_STATUS_COUNT * id) + WARN]
- || this->Status[(POLICY_STATUS_COUNT * id) + NEW]
- || this->Status[(POLICY_STATUS_COUNT * id) + REQUIRED_ALWAYS]
- || this->Status[(POLICY_STATUS_COUNT * id) + REQUIRED_IF_USED];
+ || this->Status[(POLICY_STATUS_COUNT * id) + NEW];
}
bool cmPolicies::PolicyMap::IsEmpty() const