foamDictionary: Ignore function name in substitution list
so that foamDictionary conveniently supports the same format as the #includeFunc argument list, e.g. foamDictionary -set 'fieldAverage(U, p, prime2Mean = yes)' fieldAverage The unnamed field arguments 'U' and 'p' are ignored by foamDictionary.
This commit is contained in:
@ -269,8 +269,8 @@ void substitute(dictionary& dict, string substitutions)
|
||||
{
|
||||
// Add '()' delimiters to the substitutions if not present
|
||||
const string whitespace(" \t");
|
||||
string::size_type first = substitutions.find_first_not_of(whitespace);
|
||||
if (substitutions[first] != '(')
|
||||
string::size_type last = substitutions.find_last_not_of(whitespace);
|
||||
if (substitutions[last] != ')')
|
||||
{
|
||||
substitutions = '(' + substitutions + ')';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user