Changeset 8314 for code/trunk/src/libraries/network
- Timestamp:
- Apr 23, 2011, 10:56:00 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/network/synchronisable/Synchronisable.h
r7801 r8314 215 215 } 216 216 217 template <class T> void Synchronisable::unregisterVariable(T& variable){ 217 template <class T> void Synchronisable::unregisterVariable(T& variable) 218 { 218 219 std::vector<SynchronisableVariableBase*>::iterator it = syncList_.begin(); 219 while(it!=syncList_.end()){ 220 if( ((*it)->getReference()) == &variable ){ 220 while(it!=syncList_.end()) 221 { 222 if( ((*it)->getReference()) == &variable ) 223 { 221 224 this->dataSize_ -= (*it)->getSize(Synchronisable::state_); 222 225 delete (*it); … … 227 230 it++; 228 231 } 229 bool unregistered_nonexistent_variable = false;230 assert( unregistered_nonexistent_variable); //if we reach this point something went wrong:232 COUT(1) << "Tried to unregister not registered variable" << endl; 233 assert(false); //if we reach this point something went wrong: 231 234 // the variable has not been registered before 232 235 }
Note: See TracChangeset
for help on using the changeset viewer.