mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use HashTable ternary-like lookup in argList
This commit is contained in:
@ -729,14 +729,13 @@ void Foam::argList::parse
|
|||||||
// 2. environment var FOAM_FILEHANDLER
|
// 2. environment var FOAM_FILEHANDLER
|
||||||
// 3. etc/controlDict optimisationSwitches 'fileHandler'
|
// 3. etc/controlDict optimisationSwitches 'fileHandler'
|
||||||
// 4. system/controlDict 'fileHandler' (not handled here; done in TimeIO.C)
|
// 4. system/controlDict 'fileHandler' (not handled here; done in TimeIO.C)
|
||||||
|
// 5. '-fileHandler' commmand-line option
|
||||||
|
|
||||||
{
|
{
|
||||||
word handlerType(getEnv("FOAM_FILEHANDLER"));
|
word handlerType
|
||||||
HashTable<string>::const_iterator iter = options_.find("fileHandler");
|
(
|
||||||
if (iter != options_.end())
|
options_.lookup("fileHandler", getEnv("FOAM_FILEHANDLER"))
|
||||||
{
|
);
|
||||||
handlerType = iter();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (handlerType.empty())
|
if (handlerType.empty())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user