summaryrefslogtreecommitdiffstats
path: root/Source/cmWhileCommand.cxx
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2019-04-07 19:46:46 (GMT)
committerRegina Pfeifer <regina@mailbox.org>2019-07-21 07:25:32 (GMT)
commit28f2d12a055e025aa0ddeb9842f204f29181eaff (patch)
treec72caeac0330934a280f3a014688b43c55a11eea /Source/cmWhileCommand.cxx
parentde77d355ac1808164b7247290f45b8133ce1246b (diff)
downloadCMake-28f2d12a055e025aa0ddeb9842f204f29181eaff.zip
CMake-28f2d12a055e025aa0ddeb9842f204f29181eaff.tar.gz
CMake-28f2d12a055e025aa0ddeb9842f204f29181eaff.tar.bz2
cmCommand: De-virtualize function InvokeInitialPass
Diffstat (limited to 'Source/cmWhileCommand.cxx')
-rw-r--r--Source/cmWhileCommand.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx
index 434c298..37d1c74 100644
--- a/Source/cmWhileCommand.cxx
+++ b/Source/cmWhileCommand.cxx
@@ -11,6 +11,7 @@
#include "cmMessageType.h"
#include "cmSystemTools.h"
+#include <string>
#include <utility>
cmWhileFunctionBlocker::cmWhileFunctionBlocker(cmMakefile* mf)
@@ -129,19 +130,20 @@ bool cmWhileFunctionBlocker::ShouldRemove(const cmListFileFunction& lff,
return false;
}
-bool cmWhileCommand::InvokeInitialPass(
- const std::vector<cmListFileArgument>& args, cmExecutionStatus&)
+bool cmWhileCommand(std::vector<cmListFileArgument> const& args,
+ cmExecutionStatus& status)
{
if (args.empty()) {
- this->SetError("called with incorrect number of arguments");
+ status.SetError("called with incorrect number of arguments");
return false;
}
// create a function blocker
{
- auto fb = cm::make_unique<cmWhileFunctionBlocker>(this->Makefile);
+ cmMakefile& makefile = status.GetMakefile();
+ auto fb = cm::make_unique<cmWhileFunctionBlocker>(&makefile);
fb->Args = args;
- this->Makefile->AddFunctionBlocker(std::move(fb));
+ makefile.AddFunctionBlocker(std::move(fb));
}
return true;
}