BUG: dimensioned<Type> - corrected handling of lookupOrDefault. Closes #1116

This commit is contained in:
Andrew Heather
2018-12-07 11:45:47 +00:00
parent 31642a7d88
commit afc373d683

View File

@ -212,13 +212,14 @@ Foam::dimensioned<Type> Foam::dimensioned<Type>::lookupOrDefault
const Type& defaultValue const Type& defaultValue
) )
{ {
return if (dict.found(name))
dimensioned<Type> {
( return dimensioned<Type>(name, dims, dict);
name, }
dims, else
dict.lookupOrDefault<Type>(name, defaultValue) {
); return dimensioned<Type>(name, dims, defaultValue);
}
} }