Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1762 for code/trunk


Ignore:
Timestamp:
Sep 10, 2008, 12:01:46 PM (16 years ago)
Author:
rgrieder
Message:

Fix for Core::getInstance didn't work on linux.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/core/Core.cc

    r1756 r1762  
    5050        RegisterRootObject(Core);
    5151        this->setConfigValues();
     52        isCreatingCoreSettings() = false;
    5253    }
    5354
     
    6667    {
    6768        static bool bCreatingCoreSettings = true;
    68         static bool bFirstTime = true;
    69         if (bFirstTime)
    70         {
    71             bFirstTime = false;
    72             Core::getInstance();
    73         }
    7469        return bCreatingCoreSettings;
    7570    }
     
    8176    Core& Core::getInstance()
    8277    {
    83         static Core instance;
    84 
    8578        // If bCreatingSoftDebugLevelObject is true, we're just about to create an instance of the DebugLevel class
    8679        //if (Core::isCreatingCoreSettings())
    8780        //{
    8881        //    isCreatingCoreSettings() = false;
    89         //    instance.setConfigValues();
     82        //    //instance.setConfigValues();
    9083        //}
     84
     85        static bool firstTime = true;
     86        if (firstTime)
     87            isCreatingCoreSettings() = true;
     88
     89        static Core instance;
    9190        return instance;
    9291    }
Note: See TracChangeset for help on using the changeset viewer.