Commit 5558070d authored by wahikihiki's avatar wahikihiki

cmExecutionStatus: Remove function Clear

parent 2327cc0e
......@@ -22,15 +22,6 @@ public:
{
}
void Clear()
{
this->Error = "unknown error.";
this->ReturnInvoked = false;
this->BreakInvoked = false;
this->ContinueInvoked = false;
this->NestedError = false;
}
cmMakefile& GetMakefile() { return this->Makefile; }
void SetError(std::string const& e) { this->Error = e; }
......
......@@ -74,9 +74,8 @@ bool cmForEachFunctionBlocker::Replay(
// set the variable to the loop value
mf.AddDefinition(this->Args[0], arg);
// Invoke all the functions that were collected in the block.
cmExecutionStatus status(mf);
for (cmListFileFunction const& func : functions) {
status.Clear();
cmExecutionStatus status(mf);
mf.ExecuteCommand(func, status);
if (status.GetReturnInvoked()) {
inStatus.SetReturnInvoked();
......
......@@ -61,7 +61,6 @@ bool cmIfFunctionBlocker::Replay(std::vector<cmListFileFunction> functions,
{
cmMakefile& mf = inStatus.GetMakefile();
// execute the functions for the true parts of the if statement
cmExecutionStatus status(mf);
int scopeDepth = 0;
for (cmListFileFunction const& func : functions) {
// keep track of scope depth
......@@ -147,7 +146,7 @@ bool cmIfFunctionBlocker::Replay(std::vector<cmListFileFunction> functions,
// should we execute?
else if (!this->IsBlocking) {
status.Clear();
cmExecutionStatus status(mf);
mf.ExecuteCommand(func, status);
if (status.GetReturnInvoked()) {
inStatus.SetReturnInvoked();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment