mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -174,9 +174,9 @@ bool Foam::functionObjects::ddt2::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))
|
||||
{
|
||||
|
||||
@ -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))
|
||||
{
|
||||
|
||||
@ -284,7 +284,7 @@ bool Foam::functionObjects::ensightWrite::write()
|
||||
// Check exact matches first
|
||||
for (const wordRe& select : selectFields_)
|
||||
{
|
||||
if (!select.isPattern())
|
||||
if (select.isLiteral())
|
||||
{
|
||||
const word& fieldName = select;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user