[Orxonox-commit 311] r2940 - branches/netp2/src/network/synchronisable
scheusso at orxonox.net
scheusso at orxonox.net
Wed Apr 29 19:05:51 CEST 2009
Author: scheusso
Date: 2009-04-29 19:05:51 +0200 (Wed, 29 Apr 2009)
New Revision: 2940
Modified:
branches/netp2/src/network/synchronisable/Synchronisable.h
Log:
fixed bug for bidirectional variables
Modified: branches/netp2/src/network/synchronisable/Synchronisable.h
===================================================================
--- branches/netp2/src/network/synchronisable/Synchronisable.h 2009-04-29 14:38:35 UTC (rev 2939)
+++ branches/netp2/src/network/synchronisable/Synchronisable.h 2009-04-29 17:05:51 UTC (rev 2940)
@@ -185,11 +185,16 @@
template <class T> void Synchronisable::registerVariable(T& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
{
if (bidirectional)
+ {
syncList.push_back(new SynchronisableVariableBidirectional<const T>(variable, mode, cb));
+ this->dataSize_ += syncList.back()->getSize(state_);
+ }
else
+ {
syncList.push_back(new SynchronisableVariable<const T>(variable, mode, cb));
- if ( this->state_ == mode )
- this->dataSize_ += syncList.back()->getSize(state_);
+ if ( this->state_ == mode )
+ this->dataSize_ += syncList.back()->getSize(state_);
+ }
}
More information about the Orxonox-commit
mailing list