From fcea4a3b452c5126d826610f73fb669c2e600726 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 12 Jun 2020 06:52:47 -0400 Subject: cmStateSnapshot: Invert CanPopPolicyScope return value to match name --- Source/cmMakefile.cxx | 2 +- Source/cmStateSnapshot.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 1f1c06a..3c1cba2 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4605,7 +4605,7 @@ void cmMakefile::PopSnapshot(bool reportError) // cmStateSnapshot manages nested policy scopes within it. // Since the scope corresponding to the snapshot is closing, // reject any still-open nested policy scopes with an error. - while (!this->StateSnapshot.CanPopPolicyScope()) { + while (this->StateSnapshot.CanPopPolicyScope()) { if (reportError) { this->IssueMessage(MessageType::FATAL_ERROR, "cmake_policy PUSH without matching POP"); diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx index c223431..15a98af 100644 --- a/Source/cmStateSnapshot.cxx +++ b/Source/cmStateSnapshot.cxx @@ -148,7 +148,7 @@ bool cmStateSnapshot::PopPolicy() bool cmStateSnapshot::CanPopPolicyScope() { - return this->Position->Policies == this->Position->PolicyScope; + return this->Position->Policies != this->Position->PolicyScope; } void cmStateSnapshot::SetPolicy(cmPolicies::PolicyID id, -- cgit v0.12