Changeset 698 for code/branches/FICN/src/orxonox/core/Identifier.cc
- Timestamp:
- Dec 27, 2007, 5:49:03 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/core/Identifier.cc
r696 r698 38 38 // ### Identifier ### 39 39 // ############################### 40 int Identifier::hierarchyCreatingCounter_s = 0; // Set the static member variable hierarchyCreatingCounter_s to zero 41 unsigned int Identifier::classIDcounter_s = 0; // Set the static member variable classIDcounter_s to zero 40 int Identifier::hierarchyCreatingCounter_s = 0; // Set the static member variable hierarchyCreatingCounter_s to zero (this static member variable is ok: it's used in main(), not before) 42 41 43 42 /** … … 50 49 51 50 this->children_ = new IdentifierList; 52 this->classID_ = Identifier::classIDcounter_s++; 51 52 // Use a static variable because the classID gets created before main() and that's why we should avoid static member variables 53 static unsigned int classIDcounter_s = 0; 54 this->classID_ = classIDcounter_s++; 53 55 } 54 56
Note: See TracChangeset
for help on using the changeset viewer.