mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
corrected logic
This commit is contained in:
@ -344,7 +344,7 @@ bool doCommand
|
|||||||
/ (10*Pstream::nProcs());
|
/ (10*Pstream::nProcs());
|
||||||
|
|
||||||
|
|
||||||
bool error = false;
|
bool ok = true;
|
||||||
|
|
||||||
// Set to work on
|
// Set to work on
|
||||||
autoPtr<topoSet> currentSetPtr(NULL);
|
autoPtr<topoSet> currentSetPtr(NULL);
|
||||||
@ -388,7 +388,7 @@ bool doCommand
|
|||||||
Pout<< " Cannot construct/load set "
|
Pout<< " Cannot construct/load set "
|
||||||
<< topoSet::localPath(mesh, setName) << endl;
|
<< topoSet::localPath(mesh, setName) << endl;
|
||||||
|
|
||||||
error = true;
|
ok = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -518,7 +518,7 @@ bool doCommand
|
|||||||
}
|
}
|
||||||
catch (Foam::IOerror& fIOErr)
|
catch (Foam::IOerror& fIOErr)
|
||||||
{
|
{
|
||||||
error = true;
|
ok = false;
|
||||||
|
|
||||||
Pout<< fIOErr.message().c_str() << endl;
|
Pout<< fIOErr.message().c_str() << endl;
|
||||||
|
|
||||||
@ -529,7 +529,7 @@ bool doCommand
|
|||||||
}
|
}
|
||||||
catch (Foam::error& fErr)
|
catch (Foam::error& fErr)
|
||||||
{
|
{
|
||||||
error = true;
|
ok = false;
|
||||||
|
|
||||||
Pout<< fErr.message().c_str() << endl;
|
Pout<< fErr.message().c_str() << endl;
|
||||||
|
|
||||||
@ -539,15 +539,16 @@ bool doCommand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return !error;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Status returned from parsing the first token of the line
|
||||||
enum commandStatus
|
enum commandStatus
|
||||||
{
|
{
|
||||||
QUIT,
|
QUIT, // quit program
|
||||||
INVALID,
|
INVALID, // token is not a valid set manipulation command
|
||||||
VALID
|
VALID // ,, is a valid ,,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -841,7 +842,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ok = false;
|
ok = true;
|
||||||
|
|
||||||
if (stat == QUIT)
|
if (stat == QUIT)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user