diff options
author | Brad King <brad.king@kitware.com> | 2020-09-25 13:17:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-09-28 13:49:08 (GMT) |
commit | e456dae6693dc3a79e2708481a969b43cda188cf (patch) | |
tree | d4bb0f716d018dff91eeee9bc73b4dcfb54cbcc8 /Source/cmIfCommand.cxx | |
parent | 0100a4943eb862409ad0cf9619eca93e170dea4a (diff) | |
download | CMake-e456dae6693dc3a79e2708481a969b43cda188cf.zip CMake-e456dae6693dc3a79e2708481a969b43cda188cf.tar.gz CMake-e456dae6693dc3a79e2708481a969b43cda188cf.tar.bz2 |
cmConditionEvaluator: Remove extra copy of execution context
The execution context passed to the constructor always matches the top
of the backtrace, so the former can be removed in favor of using only
the latter.
Diffstat (limited to 'Source/cmIfCommand.cxx')
-rw-r--r-- | Source/cmIfCommand.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index 557817c..fc257b1 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -120,12 +120,7 @@ bool cmIfFunctionBlocker::Replay(std::vector<cmListFileFunction> functions, MessageType messType; - cmListFileContext conditionContext = - cmListFileContext::FromCommandContext( - func, this->GetStartingContext().FilePath); - - cmConditionEvaluator conditionEvaluator(mf, conditionContext, - elseifBT); + cmConditionEvaluator conditionEvaluator(mf, elseifBT); bool isTrue = conditionEvaluator.IsTrue(expandedArguments, errorString, messType); @@ -180,8 +175,7 @@ bool cmIfCommand(std::vector<cmListFileArgument> const& args, MessageType status; - cmConditionEvaluator conditionEvaluator( - makefile, makefile.GetBacktrace().Top(), makefile.GetBacktrace()); + cmConditionEvaluator conditionEvaluator(makefile, makefile.GetBacktrace()); bool isTrue = conditionEvaluator.IsTrue(expandedArguments, errorString, status); |