STYLE: dictionary: optionalSubDict returns reference

This commit is contained in:
mattijs
2022-03-03 14:07:50 +00:00
parent 83c46c813c
commit 83628e9298
2 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2018 OpenFOAM Foundation Copyright (C) 2018 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd. Copyright (C) 2020,2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -57,7 +57,7 @@ Foam::porosityModels::powerLawLopesdaCostaZone::powerLawLopesdaCostaZone
: :
zoneName_(name + ":porousZone") zoneName_(name + ":porousZone")
{ {
dictionary coeffs(dict.optionalSubDict(modelType + "Coeffs")); const dictionary& coeffs(dict.optionalSubDict(modelType + "Coeffs"));
// Vertical direction within porous region // Vertical direction within porous region
vector zDir(coeffs.get<vector>("zDir")); vector zDir(coeffs.get<vector>("zDir"));

View File

@ -165,7 +165,7 @@ void Foam::dynamicRefineFvMesh::calculateProtectedCells
void Foam::dynamicRefineFvMesh::readDict() void Foam::dynamicRefineFvMesh::readDict()
{ {
dictionary refineDict const dictionary refineDict
( (
IOdictionary IOdictionary
( (