Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4519 in orxonox.OLD for orxonox/trunk/src/proto


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

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

Location:
orxonox/trunk/src/proto
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/proto/proto_singleton.cc

    r4320 r4519  
    4747
    4848/**
    49    \returns a Pointer to this Class
    50 */
    51 ProtoSingleton* ProtoSingleton::getInstance(void)
    52 {
    53   if (!ProtoSingleton::singletonRef)
    54     ProtoSingleton::singletonRef = new ProtoSingleton();
    55   return ProtoSingleton::singletonRef;
    56 }
    57 
    58 /**
    5949   \brief standard deconstructor
    6050
  • orxonox/trunk/src/proto/proto_singleton.h

    r3955 r4519  
    1616
    1717 public:
    18   static ProtoSingleton* getInstance(void);
    1918  virtual ~ProtoSingleton(void);
     19  /** \returns a Pointer to the only object of this Class */
     20  inline static ProtoSingleton* getInstance(void) { if (!singletonRef) singletonRef = new ProtoSingleton();  return singletonRef; };
    2021
    2122 private:
Note: See TracChangeset for help on using the changeset viewer.