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:
@ -352,7 +352,7 @@ void Foam::vtkPVFoam::updateInfoPatches
|
||||
{
|
||||
const dictionary& patchDict = patchEntries[patchi].dict();
|
||||
|
||||
sizes[patchi] = readLabel(patchDict.lookup("nFaces"));
|
||||
sizes[patchi] = patchDict.lookup<label>("nFaces");
|
||||
names[patchi] = patchEntries[patchi].keyword();
|
||||
}
|
||||
|
||||
|
||||
@ -11,8 +11,8 @@ IOdictionary propsDict
|
||||
|
||||
const word cloudName(propsDict.lookup("cloudName"));
|
||||
|
||||
label sampleFrequency(readLabel(propsDict.lookup("sampleFrequency")));
|
||||
label sampleFrequency(propsDict.lookup<label>("sampleFrequency"));
|
||||
|
||||
label maxPositions(readLabel(propsDict.lookup("maxPositions")));
|
||||
label maxPositions(propsDict.lookup<label>("maxPositions"));
|
||||
|
||||
word setFormat(propsDict.lookupOrDefault<word>("setFormat", "vtk"));
|
||||
|
||||
@ -10,9 +10,9 @@
|
||||
)
|
||||
);
|
||||
|
||||
const label nIntervals(readLabel(pdfDictionary.lookup("nIntervals")));
|
||||
const label nIntervals(pdfDictionary.lookup<label>("nIntervals"));
|
||||
|
||||
const label nSamples(readLabel(pdfDictionary.lookup("nSamples")));
|
||||
const label nSamples(pdfDictionary.lookup<label>("nSamples"));
|
||||
|
||||
const bool writeData(readBool(pdfDictionary.lookup("writeData")));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user