Changeset 562 for code/branches/FICN/src/orxonox/core/DebugLevel.cc
- Timestamp:
- Dec 17, 2007, 3:58:42 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/core/DebugLevel.cc
r561 r562 5 5 namespace orxonox 6 6 { 7 int DebugLevel::softDebugLevel_s; 8 9 // CreateFactory(DebugLevel); 7 DebugLevel* DebugLevel::pointer_s = 0; 8 bool DebugLevel::bCreatingDebugLevelObject_s = false; 10 9 11 10 DebugLevel::DebugLevel() 12 11 { 13 Register Object(DebugLevel);12 RegisterRootObject(DebugLevel); 14 13 SetConfigValue(softDebugLevel_s, 2); 15 14 } … … 17 16 int DebugLevel::getSoftDebugLevel() 18 17 { 19 return DebugLevel::softDebugLevel_s; 18 if (!pointer_s && !bCreatingDebugLevelObject_s) 19 { 20 bCreatingDebugLevelObject_s = true; 21 pointer_s = new DebugLevel; 22 bCreatingDebugLevelObject_s = false; 23 } 24 25 if (bCreatingDebugLevelObject_s) 26 return 4; 27 28 return pointer_s->softDebugLevel_s; 20 29 } 21 30 }
Note: See TracChangeset
for help on using the changeset viewer.