mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: check autoPtr as plain bool instead of valid()
- cleaner code, more similarity with unique_ptr
Now
if (ptr)
if (!ptr)
instead
if (ptr.valid())
if (!ptr.valid())
This commit is contained in:
@ -802,9 +802,9 @@ int main(int argc, char *argv[])
|
||||
ctrl
|
||||
);
|
||||
}
|
||||
else if (exprDictPtr.valid())
|
||||
else if (exprDictPtr)
|
||||
{
|
||||
const dictionary& exprDict = exprDictPtr();
|
||||
const dictionary& exprDict = *exprDictPtr;
|
||||
|
||||
// Read set construct info from dictionary
|
||||
PtrList<entry> actions(exprDict.lookup("expressions"));
|
||||
@ -898,7 +898,7 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
}
|
||||
}
|
||||
else if (exprDictPtr.valid())
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "No command-line or dictionary??" << nl << endl
|
||||
|
||||
Reference in New Issue
Block a user