diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmPolicies.cxx | 16 | ||||
-rw-r--r-- | Source/cmPolicies.h | 2 |
2 files changed, 2 insertions, 16 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 diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index 8a3c27d..a5aba58 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -244,7 +244,6 @@ public: REQUIRED_IF_USED, REQUIRED_ALWAYS ///< Issue an error unless user sets policy status to NEW. }; -#define POLICY_STATUS_COUNT 5 /// Policy identifiers enum PolicyID @@ -288,6 +287,7 @@ public: bool IsEmpty() const; private: +#define POLICY_STATUS_COUNT 3 std::bitset<cmPolicies::CMPCOUNT * POLICY_STATUS_COUNT> Status; }; }; |