diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx index 778569f7bc..90c45bab7d 100644 --- a/Source/cmStateSnapshot.cxx +++ b/Source/cmStateSnapshot.cxx @@ -169,7 +169,7 @@ bool cmStateSnapshot::PopPolicy() return true; } -bool cmStateSnapshot::CanPopPolicyScope() +bool cmStateSnapshot::CanPopPolicyScope() const { return this->Position->Policies != this->Position->PolicyScope; } @@ -243,7 +243,7 @@ bool cmStateSnapshot::PopDiagnostic() return true; } -bool cmStateSnapshot::CanPopDiagnosticScope() +bool cmStateSnapshot::CanPopDiagnosticScope() const { return this->Position->Diagnostics != this->Position->DiagnosticScope; } diff --git a/Source/cmStateSnapshot.h b/Source/cmStateSnapshot.h index d7f8bfc9af..da4e905b72 100644 --- a/Source/cmStateSnapshot.h +++ b/Source/cmStateSnapshot.h @@ -56,7 +56,7 @@ public: bool parent_scope = false) const; void PushPolicy(cmPolicies::PolicyMap const& entry, bool weak); bool PopPolicy(); - bool CanPopPolicyScope(); + bool CanPopPolicyScope() const; void SetDiagnostic(cmDiagnostics::DiagnosticCategory category, cmDiagnostics::DiagnosticAction action, bool recursive); @@ -77,7 +77,7 @@ public: } void PushDiagnostic(cmDiagnostics::DiagnosticMap entry, bool weak); bool PopDiagnostic(); - bool CanPopDiagnosticScope(); + bool CanPopDiagnosticScope() const; cmState* GetState() const;