ENH: stringOps - getVariable function - make use of the allowEmpty flag

This commit is contained in:
Andrew Heather
2017-05-31 17:44:44 +01:00
parent acc048a2ce
commit 4bbc62bbb8

View File

@ -308,7 +308,7 @@ Foam::string Foam::stringOps::getVariable
}
}
if (value.empty())
if (!allowEmpty && value.empty())
{
FatalIOErrorInFunction
(
@ -317,7 +317,8 @@ Foam::string Foam::stringOps::getVariable
<< name << exit(FatalIOError);
}
}
else
if (!allowEmpty && value.empty())
{
FatalIOErrorInFunction
(