mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
- instead of dict.lookup(name) >> val;
can use dict.readEntry(name, val);
for checking of input token sizes.
This helps catch certain types of input errors:
{
key1 ; // <- Missing value
key2 1234 // <- Missing ';' terminator
key3 val;
}
STYLE: readIfPresent() instead of 'if found ...' in a few more places.
This commit is contained in:
@ -85,7 +85,7 @@ void Foam::helpTypes::helpSolver::execute
|
||||
}
|
||||
else if (args.found("read"))
|
||||
{
|
||||
mesh.time().controlDict().lookup("application") >> solver;
|
||||
mesh.time().controlDict().readEntry("application", solver);
|
||||
displayDoc(solver, ".*solvers/.*Foam/", true, "C");
|
||||
}
|
||||
else
|
||||
|
||||
@ -119,7 +119,7 @@ void Foam::helpType::displayDoc
|
||||
{
|
||||
const dictionary& docDict =
|
||||
debug::controlDict().subDict("Documentation");
|
||||
docDict.lookup("docBrowser") >> docBrowser;
|
||||
docDict.readEntry("docBrowser", docBrowser);
|
||||
}
|
||||
|
||||
doxygenXmlParser parser
|
||||
|
||||
Reference in New Issue
Block a user