Commit 4f5f66e7 authored by henry's avatar henry
Browse files

Reverted change concerning the location of the construction of the "null" strings.

Changed dotFoam function to use null-constructed strings rather that the "null" strings.
parent 413f3fd9
......@@ -91,7 +91,9 @@ Foam::string Foam::getEnv(const word& envName)
}
else
{
return string::null;
// Return null-constructed string rather than string::null
// to avoid cyclic dependencies in the construction of globals
return string();
}
}
......@@ -277,7 +279,9 @@ Foam::fileName Foam::findEtcFile(const fileName& name, bool mandatory)
::exit(1);
}
return fileName::null;
// Return null-constructed fileName rather than fileName::null
// to avoid cyclic dependencies in the construction of globals
return fileName();
}
......
......@@ -37,11 +37,6 @@ Description
const char* const Foam::FOAMversion = "WM_PROJECT_VERSION";
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Static initializers for string::null, word::null and fileName::null
#include "stringsGlobals.C"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Setup an error handler for the global new operator
......
......@@ -62,7 +62,7 @@ pid_t pgid();
bool env(const word&);
//- Return environment variable of given name
// Return string::null if the environment is undefined
// Return string() if the environment is undefined
string getEnv(const word& name);
//- Set an environment variable
......@@ -101,7 +101,7 @@ bool chDir(const fileName& dir);
// -# shipped settings:
// - $WM_PROJECT_DIR/etc/
//
// @return the full path name or fileName::null if the name cannot be found
// @return the full path name or fileName() if the name cannot be found
// Optionally abort if the file cannot be found
fileName findEtcFile(const fileName& name, bool mandatory=false);
......
......@@ -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 * * * * * * * * * * * * * * //
......
......@@ -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 * * * * * * * * * * * * * //
......
......@@ -38,8 +38,4 @@ Description
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
const Foam::string Foam::string::null;
const Foam::word Foam::word::null;
const Foam::fileName Foam::fileName::null;
// ************************************************************************* //
......@@ -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;
// ************************************************************************* //
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment