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/core/Shell.cc

    r3301 r3366  
    5151    SetConsoleCommandShortcut(OutputHandler, debug);
    5252
    53     Shell* Shell::singletonRef_s = 0;
     53    Shell* Shell::singletonPtr_s = 0;
    5454
    5555    Shell::Shell()
    5656    {
    57         assert(singletonRef_s == 0);
    58         singletonRef_s = this;
    59 
    6057        int level = Core::getSoftDebugLevel(OutputHandler::LD_Shell);
    6158        Core::setSoftDebugLevel(OutputHandler::LD_Shell, -1);
     
    9289        if (this->inputBuffer_)
    9390            delete this->inputBuffer_;
    94         singletonRef_s = 0;
    9591    }
    9692
Note: See TracChangeset for help on using the changeset viewer.