Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6735


Ignore:
Timestamp:
Apr 16, 2010, 12:06:45 PM (15 years ago)
Author:
rgrieder
Message:

Removed getInstancePtr() from all Singletons.
Use "exists()" (check) and "&getInstance()" (pointer) instead.

Location:
code/branches/gamestates2/src/orxonox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamestates2/src/orxonox/CameraManager.h

    r5929 r6735  
    6161            void useCamera(Ogre::Camera* camera);
    6262
    63             static CameraManager* getInstancePtr() { return singletonPtr_s; }
    64 
    6563        private:
    6664            CameraManager(const CameraManager&); // don't use
  • code/branches/gamestates2/src/orxonox/Level.cc

    r6417 r6735  
    5858        if (this->isInitialized())
    5959        {
    60             if (LevelManager::getInstancePtr())
     60            if (LevelManager::exists())
    6161                LevelManager::getInstance().releaseActivity(this);
    6262
     
    116116            (*it)->setGametype(rootgametype);
    117117
    118         if (LevelManager::getInstancePtr())
     118        if (LevelManager::exists())
    119119            LevelManager::getInstance().requestActivity(this);
    120120    }
  • code/branches/gamestates2/src/orxonox/LevelManager.h

    r6417 r6735  
    6262            const std::string& getAvailableLevelListItem(unsigned int index) const; //tolua_export
    6363
    64             static LevelManager* getInstancePtr() { return singletonPtr_s; }
    6564            static LevelManager& getInstance()    { return Singleton<LevelManager>::getInstance(); } // tolua_export
    6665
  • code/branches/gamestates2/src/orxonox/PlayerManager.cc

    r6417 r6735  
    6666            this->clients_[clientID] = player;
    6767
    68             if (LevelManager::getInstancePtr() && LevelManager::getInstance().getActiveLevel())
     68            if (LevelManager::exists() && LevelManager::getInstance().getActiveLevel())
    6969                LevelManager::getInstance().getActiveLevel()->playerEntered(player);
    7070        }
     
    8282            this->clients_.erase(clientID);
    8383
    84             if (LevelManager::getInstancePtr() && LevelManager::getInstance().getActiveLevel())
     84            if (LevelManager::exists() && LevelManager::getInstance().getActiveLevel())
    8585                LevelManager::getInstance().getActiveLevel()->playerLeft(player);
    8686
Note: See TracChangeset for help on using the changeset viewer.