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/LuaBind.cc

    r3340 r3366  
    4343namespace orxonox
    4444{
    45   LuaBind* LuaBind::singletonRef_s = NULL;
     45  LuaBind* LuaBind::singletonPtr_s = NULL;
    4646
    4747  LuaBind::LuaBind()
    4848  {
    49     assert(LuaBind::singletonRef_s == 0);
    50     LuaBind::singletonRef_s = this;
    51 
    5249    this->includePath_ = Core::getMediaPathString();
    5350
     
    7572  {
    7673    this->closeToluaInterfaces(luaState_);
    77 
    78     assert(singletonRef_s);
    79     LuaBind::singletonRef_s = NULL;
    8074  };
    8175
Note: See TracChangeset for help on using the changeset viewer.