Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4519 in orxonox.OLD for orxonox/trunk/src/lib/particles


Ignore:
Timestamp:
Jun 6, 2005, 2:36:04 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: changed all getInstances into inline functions to save some (minor) time

Location:
orxonox/trunk/src/lib/particles
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/particles/particle_engine.cc

    r4478 r4519  
    4343*/
    4444ParticleEngine* ParticleEngine::singletonRef = NULL;
    45 
    46 /**
    47    \returns a Pointer to this Class
    48 */
    49 ParticleEngine* ParticleEngine::getInstance(void)
    50 {
    51   if (!ParticleEngine::singletonRef)
    52     ParticleEngine::singletonRef = new ParticleEngine();
    53   return ParticleEngine::singletonRef;
    54 }
    5545
    5646/**
  • orxonox/trunk/src/lib/particles/particle_engine.h

    r4478 r4519  
    3030
    3131 public:
    32   static ParticleEngine* getInstance(void);
    3332  virtual ~ParticleEngine(void);
     33  /** \returns a Pointer to the only object of this Class */
     34  inline static ParticleEngine* getInstance(void) { if (!singletonRef) singletonRef = new ParticleEngine();  return singletonRef; };
    3435
    3536  void tick(float dt);
Note: See TracChangeset for help on using the changeset viewer.