dictionary: Updated the global() function to return the global state of the parent dictionary

if the parent dictionary is valid.
This commit is contained in:
Henry Weller
2024-05-21 18:53:38 +01:00
parent 3521d9889a
commit 20a1ef7b20

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -152,7 +152,14 @@ bool Foam::dictionary::read(Istream& is, const bool keepHeader)
bool Foam::dictionary::global() const
{
return false;
if (&parent_ != &dictionary::null)
{
return parent_.global();
}
else
{
return false;
}
}