Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


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/subprojects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/subprojects/framework.cc

    r4374 r4519  
    236236Framework* Framework::singletonRef = NULL;
    237237
    238 Framework* Framework::getInstance(void)
    239 {
    240   if (Framework::singletonRef == NULL)
    241     Framework::singletonRef = new Framework();
    242   return Framework::singletonRef;
    243 }
    244 
    245238Framework::Framework()
    246239{
  • orxonox/trunk/src/subprojects/framework.h

    r4374 r4519  
    3737  ~Framework();
    3838 
    39   static Framework* getInstance(void);
     39  /** \returns a Pointer to the only object of this Class */
     40  inline static Framework* getInstance(void) { if (!singletonRef) singletonRef = new Framework();  return singletonRef; };
    4041
    4142
Note: See TracChangeset for help on using the changeset viewer.