ENH: isLiteral() method for keyType and wordRe

- same as !isPattern(), but can be more readable.

- add wordRe enum state 'UNKNOWN', which has the identical value as
  'DETECT' but used for a return value.
This commit is contained in:
Mark Olesen
2018-10-07 17:28:11 +02:00
parent 87cc19de82
commit 8d6f83e666
10 changed files with 43 additions and 26 deletions

View File

@ -133,9 +133,9 @@ bool Foam::functionObjects::zeroGradient::execute()
// Check exact matches first
for (const wordRe& select : selectFields_)
{
if (!select.isPattern())
if (select.isLiteral())
{
const word& fieldName = static_cast<const word&>(select);
const word& fieldName = select;
if (!candidates.erase(fieldName))
{