diff --git a/Source/cmBlockCommand.cxx b/Source/cmBlockCommand.cxx index 575efe646c..d57c17051a 100644 --- a/Source/cmBlockCommand.cxx +++ b/Source/cmBlockCommand.cxx @@ -40,19 +40,19 @@ public: BlockScopePushPop& operator=(BlockScopePushPop const&) = delete; private: - std::unique_ptr PolicyScope; std::unique_ptr VariableScope; + std::unique_ptr PolicyScope; std::unique_ptr DiagnosticScope; }; BlockScopePushPop::BlockScopePushPop(cmMakefile* mf, ScopeSet const& scopes) { - if (scopes.contains(ScopeType::POLICIES)) { - this->PolicyScope = cm::make_unique(mf); - } if (scopes.contains(ScopeType::VARIABLES)) { this->VariableScope = cm::make_unique(mf); } + if (scopes.contains(ScopeType::POLICIES)) { + this->PolicyScope = cm::make_unique(mf); + } if (scopes.contains(ScopeType::DIAGNOSTICS)) { this->DiagnosticScope = cm::make_unique(mf); }