STYLE: add notes where files are added into global/globals.C

ENH: use dictionary findDict() directly for debugSwitches

- the isDict() method is just a wrapper around the pointer anyhow
This commit is contained in:
Mark Olesen
2022-11-17 15:19:52 +01:00
parent d009cb8bc1
commit 3b0af86448
14 changed files with 44 additions and 9 deletions

View File

@ -25,7 +25,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Note
File included by global/global.Cver
Included by global/globals.C
\*---------------------------------------------------------------------------*/

View File

@ -24,6 +24,9 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Note
Included by global/globals.C
\*---------------------------------------------------------------------------*/
#include "UPstream.H"

View File

@ -24,6 +24,9 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Note
Included by global/globals.C
\*---------------------------------------------------------------------------*/
#include "token.H"

View File

@ -24,6 +24,9 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Note
Included by global/globals.C
\*---------------------------------------------------------------------------*/
#include "error.H"

View File

@ -24,6 +24,9 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Note
Included by global/globals.C
\*---------------------------------------------------------------------------*/
#include "error.H"

View File

@ -24,6 +24,9 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Note
Included by global/globals.C
\*---------------------------------------------------------------------------*/
#include "error.H"

View File

@ -24,6 +24,9 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Note
Included by global/globals.C
\*---------------------------------------------------------------------------*/
#include "regIOobject.H"

View File

@ -24,6 +24,9 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Note
Included by global/globals.C
\*---------------------------------------------------------------------------*/
#include "JobInfo.H"

View File

@ -23,6 +23,9 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Note
Included by global/globals.C
\*---------------------------------------------------------------------------*/
// Constants supplied in the main controlDict

View File

@ -24,11 +24,14 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Note
Included by global/globals.C
\*---------------------------------------------------------------------------*/
#include "dimensionedConstants.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * File Static Data * * * * * * * * * * * * * //
namespace Foam
{

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2018 OpenFOAM Foundation
Copyright (C) 2019-2020 OpenCFD Ltd.
Copyright (C) 2019-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -27,6 +27,9 @@ License
Description
Class for handling debugging switches.
Note
Included by global/globals.C
\*---------------------------------------------------------------------------*/
#include "debug.H"
@ -184,9 +187,9 @@ Foam::dictionary& Foam::debug::switchSet
{
if (!subDictPtr)
{
entry* eptr = controlDict().findEntry(subDictName, keyType::LITERAL);
subDictPtr = controlDict().findDict(subDictName, keyType::LITERAL);
if (!eptr || !eptr->isDict())
if (!subDictPtr)
{
std::cerr
<< "debug::switchSet(const char*, dictionary*&):\n"
@ -196,8 +199,6 @@ Foam::dictionary& Foam::debug::switchSet
std::exit(1);
}
subDictPtr = &(eptr->dict());
}
return *subDictPtr;

View File

@ -23,6 +23,9 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Note
Included by global/globals.C
\*---------------------------------------------------------------------------*/
#include "nullObject.H"

View File

@ -23,6 +23,9 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Note
Included by global/globals.C
\*---------------------------------------------------------------------------*/
#include "zero.H"

View File

@ -3,8 +3,9 @@
SUFFIXES += .Cver
# Update strings in C++ file and in META-INFO files
# place intermediate generated file into the build directory
Cvertoo = \
$(WM_SCRIPTS)/wmake-build-info -update -filter $< > $(@D)/$(<F).C; \
$(CC) $(c++FLAGS) -c $(@D)/$(<F).C -o $@
$(WM_SCRIPTS)/wmake-build-info -update -filter $< > $(@D)/$(<F).cc; \
$(CC) $(c++FLAGS) -c $(@D)/$(<F).cc -o $@
#------------------------------------------------------------------------------