mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use new argList argRead() method and operator[] for cleaner code.
- deprecate argList::additionalArgs() method and remove uses of it
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -86,13 +86,11 @@ int main(int argc, char *argv[])
|
||||
argList::addOption("scale", "scale");
|
||||
|
||||
# include "setRootCase.H"
|
||||
const stringList& params = args.additionalArgs();
|
||||
|
||||
scalar scaleFactor = 0;
|
||||
args.optionReadIfPresent("scale", scaleFactor);
|
||||
const scalar scaleFactor = args.optionLookupOrDefault("scale", 0.0);
|
||||
|
||||
fileName importName(params[0]);
|
||||
fileName exportName(params[1]);
|
||||
const fileName importName = args[1];
|
||||
const fileName exportName = args[2];
|
||||
|
||||
if (importName == exportName)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user