diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-06-06 07:40:58 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-06-06 08:09:45 (GMT) |
commit | 44a8115797cc3f804d653928d71b126b39e29210 (patch) | |
tree | e977640b0b8ea2acdd32ece79852e886c2125314 /Source/cmPolicies.cxx | |
parent | 1981c9718b7099670b03535a241c735477d6bc6c (diff) | |
download | CMake-44a8115797cc3f804d653928d71b126b39e29210.zip CMake-44a8115797cc3f804d653928d71b126b39e29210.tar.gz CMake-44a8115797cc3f804d653928d71b126b39e29210.tar.bz2 |
cmPolicies: Replace UNDEFINED bitset with WARN bitset.
Might as well use the existing concept.
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r-- | Source/cmPolicies.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index f8d61db..3498adc 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -343,11 +343,6 @@ cmPolicies::GetRequiredAlwaysPolicyError(cmPolicies::PolicyID id) return e.str(); } -cmPolicies::PolicyMap::PolicyMap() -{ - this->UNDEFINED.set(); -} - cmPolicies::PolicyStatus cmPolicies::PolicyMap::Get(cmPolicies::PolicyID id) const { @@ -375,8 +370,8 @@ cmPolicies::PolicyMap::Get(cmPolicies::PolicyID id) const void cmPolicies::PolicyMap::Set(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status) { - this->UNDEFINED.reset(id); this->OLD[id] = (status == cmPolicies::OLD); + this->WARN[id] = (status == cmPolicies::WARN); this->NEW[id] = (status == cmPolicies::NEW); this->REQUIRED_ALWAYS[id] = (status == cmPolicies::REQUIRED_ALWAYS); this->REQUIRED_IF_USED[id] = (status == cmPolicies::REQUIRED_IF_USED); @@ -384,10 +379,12 @@ void cmPolicies::PolicyMap::Set(cmPolicies::PolicyID id, bool cmPolicies::PolicyMap::IsDefined(cmPolicies::PolicyID id) const { - return !this->UNDEFINED[id]; + return this->OLD[id] || this->WARN[id] || this->NEW[id] + || this->REQUIRED_ALWAYS[id] || this->REQUIRED_IF_USED[id]; } bool cmPolicies::PolicyMap::IsEmpty() const { - return !this->UNDEFINED.none(); + return this->OLD.none() && this->WARN.none() && this->NEW.none() + && this->REQUIRED_ALWAYS.none() && this->REQUIRED_IF_USED.none(); } |