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:
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -39,7 +40,7 @@ Foam::doxygenXmlParser::doxygenXmlParser
|
||||
const word& ext
|
||||
)
|
||||
:
|
||||
dictionary(dictionary::null)
|
||||
dictionary()
|
||||
{
|
||||
// Pre-construct and compile regular expressions
|
||||
const regExp nameRe(".*.H");
|
||||
@ -155,7 +156,7 @@ Foam::doxygenXmlParser::doxygenXmlParser
|
||||
// preferentially take exact match if it exists
|
||||
if (exactMatch && (tName + "." + ext) == name)
|
||||
{
|
||||
dictionary dict(dictionary::null);
|
||||
dictionary dict;
|
||||
dict.add("name", name);
|
||||
dict.add("filename", fName + ".html");
|
||||
dict.add("path", path);
|
||||
@ -168,7 +169,7 @@ Foam::doxygenXmlParser::doxygenXmlParser
|
||||
&& regExp(".*" + tName + ".*").match(name)
|
||||
)
|
||||
{
|
||||
dictionary dict(dictionary::null);
|
||||
dictionary dict;
|
||||
dict.add("name", name);
|
||||
dict.add("filename", fName + ".html");
|
||||
dict.add("path", path);
|
||||
|
||||
@ -53,7 +53,6 @@ class doxygenXmlParser
|
||||
:
|
||||
public dictionary
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Construct from components
|
||||
|
||||
@ -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