Changeset 3325 for code/trunk/src/core/Identifier.cc
- Timestamp:
- Jul 19, 2009, 3:48:00 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core4 merged: 3222-3224,3238
- Property svn:mergeinfo changed
-
code/trunk/src/core/Identifier.cc
r3280 r3325 47 47 // ### Identifier ### 48 48 // ############################### 49 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) 49 int Identifier::hierarchyCreatingCounter_s = 0; 50 unsigned int Identifier::classIDCounter_s = 0; 50 51 51 52 /** … … 53 54 */ 54 55 Identifier::Identifier() 56 : classID_(classIDCounter_s++) 55 57 { 56 58 this->objects_ = new ObjectListBase(this); … … 67 69 this->directChildren_ = new std::set<const Identifier*>(); 68 70 69 // Use a static variable because the classID gets created before main() and that's why we should avoid static member variables 70 static unsigned int classIDcounter_s = 0; 71 this->classID_ = classIDcounter_s++; 71 // Default network ID is the class ID 72 this->networkID_ = this->classID_; 72 73 } 73 74 … … 244 245 void Identifier::setNetworkID(uint32_t id) 245 246 { 246 Factory::changeNetworkID(this, this-> classID_, id);247 this-> classID_ = id;247 Factory::changeNetworkID(this, this->networkID_, id); 248 this->networkID_ = id; 248 249 } 249 250
Note: See TracChangeset
for help on using the changeset viewer.