mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: default construct empty dictionaries
- some code used copy construct from dictionary::null instead. The result is the same but suggests that something else may be intended. Only need dictionary::null for const-ref usage.
This commit is contained in:
@ -40,8 +40,8 @@ Foam::boundaryTemplates::boundaryTemplates
|
||||
const word& solverType
|
||||
)
|
||||
:
|
||||
templates_(dictionary::null),
|
||||
options_(dictionary::null)
|
||||
templates_(),
|
||||
options_()
|
||||
{
|
||||
Info<< " Reading boundary templates" << endl;
|
||||
|
||||
@ -62,8 +62,8 @@ Foam::boundaryTemplates::boundaryTemplates
|
||||
const word& regionType = dEntry.keyword();
|
||||
wordList patchTypes(regionBCs.lookup(regionType));
|
||||
|
||||
dictionary regionTemplate = dictionary::null;
|
||||
dictionary regionOptions = dictionary::null;
|
||||
dictionary regionTemplate;
|
||||
dictionary regionOptions;
|
||||
|
||||
// read general boundary types
|
||||
forAll(patchTypes, i)
|
||||
@ -250,8 +250,8 @@ Foam::dictionary Foam::boundaryTemplates::generatePatchDict
|
||||
// look for field name
|
||||
if (patchDict.found(fieldName))
|
||||
{
|
||||
dictionary dict(dictionary::null);
|
||||
const dictionary& fieldDict(patchDict.subDict(fieldName));
|
||||
dictionary dict;
|
||||
const dictionary& fieldDict = patchDict.subDict(fieldName);
|
||||
|
||||
for (const entry& dEntry : fieldDict)
|
||||
{
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2015 OpenFOAM Foundation
|
||||
Copyright (C) 2015 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -194,7 +194,7 @@ Foam::dictionary Foam::caseInfo::generateBoundaryField
|
||||
const boundaryTemplates& bcTemplates
|
||||
) const
|
||||
{
|
||||
dictionary boundaryField = dictionary::null;
|
||||
dictionary boundaryField;
|
||||
|
||||
forAll(boundaryInfo_.names(), j)
|
||||
{
|
||||
@ -202,7 +202,7 @@ Foam::dictionary Foam::caseInfo::generateBoundaryField
|
||||
|
||||
if (boundaryInfo_.constraint()[j])
|
||||
{
|
||||
dictionary patchDict = dictionary::null;
|
||||
dictionary patchDict;
|
||||
patchDict.add("type", boundaryInfo_.types()[j]);
|
||||
|
||||
// Add value for processor patches
|
||||
@ -228,7 +228,7 @@ Foam::dictionary Foam::caseInfo::generateBoundaryField
|
||||
|
||||
const word& patchType = patchTypes_[conditionI];
|
||||
|
||||
dictionary optionDict = dictionary::null;
|
||||
dictionary optionDict;
|
||||
if (bcTemplates.optionsRequired(regionPrefix, category, patchType))
|
||||
{
|
||||
optionDict = bcDict_.subDict(condition).subDict("options");
|
||||
|
||||
Reference in New Issue
Block a user