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:
Mark Olesen
2017-11-28 09:15:04 +01:00
parent b53e5b7404
commit c0e86940b0
10 changed files with 78 additions and 31 deletions

View File

@ -72,7 +72,7 @@ void Foam::functionObjects::mapFields::createInterpolation
);
const fvMesh& mapRegion = mapRegionPtr_();
const word mapMethodName(dict.lookup("mapMethod"));
if (!meshToMesh::interpolationMethodNames_.hasEnum(mapMethodName))
if (!meshToMesh::interpolationMethodNames_.found(mapMethodName))
{
FatalErrorInFunction
<< type() << " " << name() << ": unknown map method "