Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 29, 2009, 10:27:10 PM (15 years ago)
Author:
rgrieder
Message:

Derived all singletons implemented in a usual manner from orxonox::Singleton<T>.
This resolves inconsistencies with the singletonPtr_s variable in case of exceptions (asserts were being triggered then).
And while at it replaced singletonRef_s with singletonPtr_s for it to be less misleading (as fabian has already pointed out).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource/src/orxonox/LevelManager.cc

    r3343 r3366  
    4545    SetCommandLineArgument(level, "").shortcut("l").information("Default level file (overrides LevelManager::defaultLevelName_ configValue)");
    4646
    47     LevelManager* LevelManager::singletonRef_s = 0;
     47    LevelManager* LevelManager::singletonPtr_s = 0;
    4848
    4949    LevelManager::LevelManager()
    5050    {
    51         assert(singletonRef_s == 0);
    52         singletonRef_s = this;
    53 
    5451        RegisterRootObject(LevelManager);
    5552        this->setConfigValues();
     
    6461    LevelManager::~LevelManager()
    6562    {
    66         assert(singletonRef_s != 0);
    67         singletonRef_s = 0;
    6863    }
    6964
Note: See TracChangeset for help on using the changeset viewer.