Commit 9739fd7f authored by Pavel Vainerman's avatar Pavel Vainerman

(Configuration): сделал, что глобальный conf определяется, первым созданным Configuration.

parent f52fb898
...@@ -80,7 +80,7 @@ ostream& UniSetTypes::Configuration::help(ostream& os) ...@@ -80,7 +80,7 @@ ostream& UniSetTypes::Configuration::help(ostream& os)
namespace UniSetTypes namespace UniSetTypes
{ {
DebugStream unideb; DebugStream unideb;
Configuration *conf; Configuration *conf = 0;
Configuration::Configuration(): Configuration::Configuration():
mi(NULL), mi(NULL),
...@@ -199,7 +199,10 @@ void Configuration::initConfiguration( int argc, const char* const* argv ) ...@@ -199,7 +199,10 @@ void Configuration::initConfiguration( int argc, const char* const* argv )
getcwd(curdir,FILENAME_MAX); getcwd(curdir,FILENAME_MAX);
rootDir = string(curdir) + "/"; rootDir = string(curdir) + "/";
UniSetTypes::conf = this;
/*! \todo Надо избавляться от глобального conf (!) */
if( !UniSetTypes::conf )
UniSetTypes::conf = this;
{ {
ostringstream s; ostringstream s;
......
Markdown is supported
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