dictionary label lookup: simplified syntax using the type templated lookup function
Replaced
readLabel(dict.lookup("name"))
with
dict.lookup<label>("name)
This commit is contained in:
@ -265,7 +265,7 @@ void Foam::functionObjects::fieldAverage::readAveragingProperties()
|
||||
{
|
||||
dictionary fieldDict(propsDict.subDict(fieldName));
|
||||
|
||||
totalIter_[fieldi] = readLabel(fieldDict.lookup("totalIter"));
|
||||
totalIter_[fieldi] = fieldDict.lookup<label>("totalIter");
|
||||
totalTime_[fieldi] = readScalar(fieldDict.lookup("totalTime"));
|
||||
|
||||
Log << " " << fieldName
|
||||
|
||||
@ -346,7 +346,7 @@ bool Foam::functionObjects::streamLine::read(const dictionary& dict)
|
||||
if (!dict.found("direction") && dict.found("trackForward"))
|
||||
{
|
||||
trackDirection_ =
|
||||
dict.lookupType<bool>("trackForward")
|
||||
dict.lookup<bool>("trackForward")
|
||||
? trackDirection::forward
|
||||
: trackDirection::backward;
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ Foam::wordList Foam::functionObjects::forces::createFileNames
|
||||
if (dict.found("binData"))
|
||||
{
|
||||
const dictionary& binDict(dict.subDict("binData"));
|
||||
label nb = readLabel(binDict.lookup("nBin"));
|
||||
label nb = binDict.lookup<label>("nBin");
|
||||
if (nb > 0)
|
||||
{
|
||||
// Name for file(fileID::binsFile=1)
|
||||
|
||||
Reference in New Issue
Block a user