diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-31 16:19:58 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-06-04 20:08:23 (GMT) |
commit | d5dc4169ac1c4dd5abd385b1e8499119df88c657 (patch) | |
tree | edb2a3f9380bbdea10920da2b09963e8c1627bd6 /Source/cmFunctionCommand.cxx | |
parent | 91cd014d6452371056bb3f96de29967f506b3bd7 (diff) | |
download | CMake-d5dc4169ac1c4dd5abd385b1e8499119df88c657.zip CMake-d5dc4169ac1c4dd5abd385b1e8499119df88c657.tar.gz CMake-d5dc4169ac1c4dd5abd385b1e8499119df88c657.tar.bz2 |
cmMakefile: Create a unified raii for function scopes.
Diffstat (limited to 'Source/cmFunctionCommand.cxx')
-rw-r--r-- | Source/cmFunctionCommand.cxx | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index 001adb1..dc6d2d2 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -73,7 +73,6 @@ public: cmPolicies::PolicyMap Policies; }; - bool cmFunctionHelperCommand::InvokeInitialPass (const std::vector<cmListFileArgument>& args, cmExecutionStatus & inStatus) @@ -93,14 +92,8 @@ bool cmFunctionHelperCommand::InvokeInitialPass return false; } - // we push a scope on the makefile - cmMakefile::ScopePushPop varScope(this->Makefile); - cmMakefile::LexicalPushPop lexScope(this->Makefile); - static_cast<void>(varScope); - - // Push a weak policy scope which restores the policies recorded at - // function creation. - cmMakefile::PolicyPushPop polScope(this->Makefile, true, this->Policies); + cmMakefile::FunctionPushPop functionScope(this->Makefile, + this->Policies); // set the value of argc std::ostringstream strStream; @@ -145,8 +138,7 @@ bool cmFunctionHelperCommand::InvokeInitialPass { // The error message should have already included the call stack // so we do not need to report an error here. - lexScope.Quiet(); - polScope.Quiet(); + functionScope.Quiet(); inStatus.SetNestedError(true); return false; } |