cmExecutionStatus: Remove function Clear
This commit is contained in:
parent
2327cc0e05
commit
5558070d52
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user