mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: argList::getList with optional parameter
- this allows it to work like readListIfPresent() but with a list as the return value, which can be useful for a const context.
This commit is contained in:
@ -288,8 +288,8 @@ int main(int argc, char *argv[])
|
||||
Info<< "Subtracting mapped source field from target" << endl;
|
||||
}
|
||||
|
||||
wordRes selectedFields;
|
||||
args.readListIfPresent<wordRe>("fields", selectedFields);
|
||||
// Non-mandatory
|
||||
const wordRes selectedFields(args.getList<wordRe>("fields", false));
|
||||
|
||||
const bool noLagrangian = args.found("noLagrangian");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user