From 3cfec2915453ba1ccc5bd8aead609ebfefaf3caf Mon Sep 17 00:00:00 2001 From: Michael Wild Date: Sun, 11 Jan 2009 10:31:44 +0100 Subject: [PATCH] Revert "Moved the construction of the static "null" strings to stringsGlobals.C which is included in global.Cver to avoid inter-dependency problems in the construction of globals." This reverts commit 2d5d8da186066f8992354730f44ddbf0d8141c4a. Signed-off-by: Michael Wild --- src/OpenFOAM/files.cmake | 1 - src/OpenFOAM/global/global.Cver | 5 --- .../primitives/strings/fileName/fileName.C | 1 + src/OpenFOAM/primitives/strings/string/string.C | 1 + src/OpenFOAM/primitives/strings/stringsGlobals.C | 45 ---------------------- src/OpenFOAM/primitives/strings/word/word.C | 1 + 6 files changed, 3 insertions(+), 51 deletions(-) delete mode 100644 src/OpenFOAM/primitives/strings/stringsGlobals.C diff --git a/src/OpenFOAM/files.cmake b/src/OpenFOAM/files.cmake index 84921d2bd..7baf2aad1 100644 --- a/src/OpenFOAM/files.cmake +++ b/src/OpenFOAM/files.cmake @@ -1019,7 +1019,6 @@ set( HDRS primitives/Lists/sphericalTensorList.H primitives/strings/string/string.H primitives/strings/string/stringI.H - primitives/strings/stringsGlobals.C primitives/Lists/stringList.H primitives/Lists/stringListTemplates.C algorithms/subCycle/subCycle.H diff --git a/src/OpenFOAM/global/global.Cver b/src/OpenFOAM/global/global.Cver index 3528f2d6e..a5f7cee6f 100644 --- a/src/OpenFOAM/global/global.Cver +++ b/src/OpenFOAM/global/global.Cver @@ -40,11 +40,6 @@ const char* const Foam::FOAMversion = WM_PROJECT_VERSION; const char* const Foam::FOAMConfigDir = FF_INSTALL_CONFIG_PATH; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Static initializers for string::null, word::null and fileName::null - -#include - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Setup an error handler for the global new operator #include diff --git a/src/OpenFOAM/primitives/strings/fileName/fileName.C b/src/OpenFOAM/primitives/strings/fileName/fileName.C index 60a5a1b1d..f96faae4d 100644 --- a/src/OpenFOAM/primitives/strings/fileName/fileName.C +++ b/src/OpenFOAM/primitives/strings/fileName/fileName.C @@ -33,6 +33,7 @@ License const char* const Foam::fileName::typeName = "fileName"; int Foam::fileName::debug(debug::debugSwitch(fileName::typeName, 0)); +const Foam::fileName Foam::fileName::null; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/primitives/strings/string/string.C b/src/OpenFOAM/primitives/strings/string/string.C index 375de73c0..db7b4df22 100644 --- a/src/OpenFOAM/primitives/strings/string/string.C +++ b/src/OpenFOAM/primitives/strings/string/string.C @@ -32,6 +32,7 @@ License const char* const Foam::string::typeName = "string"; int Foam::string::debug(debug::debugSwitch(string::typeName, 0)); +const Foam::string Foam::string::null; // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/primitives/strings/stringsGlobals.C b/src/OpenFOAM/primitives/strings/stringsGlobals.C deleted file mode 100644 index 8dbbd73a5..000000000 --- a/src/OpenFOAM/primitives/strings/stringsGlobals.C +++ /dev/null @@ -1,45 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Description - Static initializers for - Foam::string::null - Foam::word::null - Foam::fileName::null. - This file is included in global.Cver since these members are required by - debug.C. - -\*---------------------------------------------------------------------------*/ - -#include -#include -#include - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -const Foam::string Foam::string::null; -const Foam::word Foam::word::null; -const Foam::fileName Foam::fileName::null; - -// ************************************************************************* // diff --git a/src/OpenFOAM/primitives/strings/word/word.C b/src/OpenFOAM/primitives/strings/word/word.C index 90573af90..c18c8aeac 100644 --- a/src/OpenFOAM/primitives/strings/word/word.C +++ b/src/OpenFOAM/primitives/strings/word/word.C @@ -31,5 +31,6 @@ License const char* const Foam::word::typeName = "word"; int Foam::word::debug(Foam::debug::debugSwitch(word::typeName, 0)); +const Foam::word Foam::word::null; // ************************ vim: set sw=4 sts=4 et: ************************ // -- 2.11.4.GIT