mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: minor improvements for Enum
- found() method for consistency with other classes - operator()(name, deflt) for similarity to lookupOrDefault, but without a dictionary
This commit is contained in:
@ -309,7 +309,7 @@ int main(int argc, char *argv[])
|
||||
if
|
||||
(
|
||||
matchName != "perfect"
|
||||
&& !slidingInterface::typeOfMatchNames.hasEnum(matchName)
|
||||
&& !slidingInterface::typeOfMatchNames.found(matchName)
|
||||
)
|
||||
{
|
||||
Info<< "Error: unknown match type - " << matchName
|
||||
|
||||
@ -229,7 +229,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
word patchMapMethod;
|
||||
if (meshToMesh::interpolationMethodNames_.hasEnum(mapMethod))
|
||||
if (meshToMesh::interpolationMethodNames_.found(mapMethod))
|
||||
{
|
||||
// Lookup corresponding AMI method
|
||||
meshToMesh::interpolationMethod method =
|
||||
|
||||
@ -1577,7 +1577,7 @@ int main(int argc, char *argv[])
|
||||
{ booleanSurface::DIFFERENCE, "difference" }
|
||||
};
|
||||
|
||||
if (!validActions.hasEnum(action))
|
||||
if (!validActions.found(action))
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unsupported action " << action << endl
|
||||
|
||||
Reference in New Issue
Block a user