Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2363


Ignore:
Timestamp:
Dec 9, 2008, 9:26:54 AM (15 years ago)
Author:
rgrieder
Message:

There is no this pointer with static variables. It's more of a C++ "feature".

Location:
code/branches/objecthierarchy2/src/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy2/src/core/Core.cc

    r2361 r2363  
    5656        RegisterRootObject(Core);
    5757
    58         assert(this->singletonRef_s == 0);
    59         this->singletonRef_s = this;
     58        assert(Core::singletonRef_s == 0);
     59        Core::singletonRef_s = this;
    6060        this->bInitializeRandomNumberGenerator_ = false;
    6161
     
    6868    Core::~Core()
    6969    {
    70         assert(singletonRef_s);
    71         singletonRef_s = 0;
     70        assert(Core::singletonRef_s);
     71        Core::singletonRef_s = 0;
    7272    }
    7373
  • code/branches/objecthierarchy2/src/core/Core.h

    r2361 r2363  
    5656            void languageChanged();
    5757
    58             static Core& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
     58            static Core& getInstance() { assert(Core::singletonRef_s); return *Core::singletonRef_s; }
    5959
    6060            static int   getSoftDebugLevel(OutputHandler::OutputDevice device = OutputHandler::LD_All);
Note: See TracChangeset for help on using the changeset viewer.