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/overlays/console/InGameConsole.cc

    r3327 r3366  
    6060    SetConsoleCommand(InGameConsole, closeConsole, true);
    6161
    62     InGameConsole* InGameConsole::singletonRef_s = 0;
     62    InGameConsole* InGameConsole::singletonPtr_s = 0;
    6363
    6464    /**
     
    7676        RegisterObject(InGameConsole);
    7777
    78         assert(singletonRef_s == 0);
    79         singletonRef_s = this;
    80 
    8178        this->bActive_ = false;
    8279        this->cursor_ = 0.0f;
     
    131128        if (this->consoleOverlay_)
    132129            Ogre::OverlayManager::getSingleton().destroy(consoleOverlay_);
    133 
    134         singletonRef_s = 0;
    135130    }
    136131
Note: See TracChangeset for help on using the changeset viewer.