[Orxonox-commit 3629] r8314 - code/trunk/src/libraries/network/synchronisable
scheusso at orxonox.net
scheusso at orxonox.net
Sat Apr 23 10:56:00 CEST 2011
Author: scheusso
Date: 2011-04-23 10:56:00 +0200 (Sat, 23 Apr 2011)
New Revision: 8314
Modified:
code/trunk/src/libraries/network/synchronisable/Synchronisable.h
Log:
clarification of an assertion
Modified: code/trunk/src/libraries/network/synchronisable/Synchronisable.h
===================================================================
--- code/trunk/src/libraries/network/synchronisable/Synchronisable.h 2011-04-23 02:52:30 UTC (rev 8313)
+++ code/trunk/src/libraries/network/synchronisable/Synchronisable.h 2011-04-23 08:56:00 UTC (rev 8314)
@@ -214,10 +214,13 @@
}
}
- template <class T> void Synchronisable::unregisterVariable(T& variable){
+ template <class T> void Synchronisable::unregisterVariable(T& variable)
+ {
std::vector<SynchronisableVariableBase*>::iterator it = syncList_.begin();
- while(it!=syncList_.end()){
- if( ((*it)->getReference()) == &variable ){
+ while(it!=syncList_.end())
+ {
+ if( ((*it)->getReference()) == &variable )
+ {
this->dataSize_ -= (*it)->getSize(Synchronisable::state_);
delete (*it);
syncList_.erase(it);
@@ -226,8 +229,8 @@
else
it++;
}
- bool unregistered_nonexistent_variable = false;
- assert(unregistered_nonexistent_variable); //if we reach this point something went wrong:
+ COUT(1) << "Tried to unregister not registered variable" << endl;
+ assert(false); //if we reach this point something went wrong:
// the variable has not been registered before
}
More information about the Orxonox-commit
mailing list