mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: avoid raw dictionary lookup in functionObjects (issue #762)
Style changes:
- use lookupObjectRef instead of using const_cast
- use tmp::New factory
This commit is contained in:
@ -97,9 +97,9 @@ bool Foam::functionObjects::runTimePostProcessing::read(const dictionary& dict)
|
||||
scene_.read(dict);
|
||||
|
||||
const dictionary& outputDict = dict.subDict("output");
|
||||
outputDict.lookup("name") >> output_.name_;
|
||||
outputDict.lookup("width") >> output_.width_;
|
||||
outputDict.lookup("height") >> output_.height_;
|
||||
outputDict.readEntry("name", output_.name_);
|
||||
outputDict.readEntry("width", output_.width_);
|
||||
outputDict.readEntry("height", output_.height_);
|
||||
|
||||
|
||||
readObjects(dict.subOrEmptyDict("points"), points_);
|
||||
@ -117,11 +117,14 @@ bool Foam::functionObjects::runTimePostProcessing::read(const dictionary& dict)
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
text_.append(new runTimePostPro::text
|
||||
text_.append
|
||||
(
|
||||
*this,
|
||||
iter().dict(),
|
||||
scene_.colours())
|
||||
new runTimePostPro::text
|
||||
(
|
||||
*this,
|
||||
iter().dict(),
|
||||
scene_.colours()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user