mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: provide operator[] for accessing argList options.
- operator[] with label -> get args at index - operator[] with word -> get named option
This commit is contained in:
@ -121,7 +121,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (args.optionFound("dict"))
|
||||
{
|
||||
fileName dictPath(args.option("dict"));
|
||||
const fileName dictPath = args["dict"];
|
||||
|
||||
ioPtr.set
|
||||
(
|
||||
@ -168,7 +168,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (args.optionFound("from"))
|
||||
{
|
||||
const word csName(args.option("from"));
|
||||
const word csName = args["from"];
|
||||
|
||||
label csId = csLst.find(csName);
|
||||
if (csId < 0)
|
||||
@ -184,7 +184,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (args.optionFound("to"))
|
||||
{
|
||||
const word csName(args.option("to"));
|
||||
const word csName = args["to"];
|
||||
|
||||
label csId = csLst.find(csName);
|
||||
if (csId < 0)
|
||||
|
||||
Reference in New Issue
Block a user