Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6144 in orxonox.OLD for trunk/src/lib/network


Ignore:
Timestamp:
Dec 16, 2005, 7:44:02 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: minor fix in synchronizeable erase instead of remove

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/network/network_stream.cc

    r6139 r6144  
    2727#include "synchronizeable.h"
    2828#include "network_manager.h"
    29 #include "list.h"
    3029#include "debug.h"
    3130#include "class_list.h"
     31#include <algorithm>
    3232
    3333/* include your own header */
     
    133133void NetworkStream::disconnectSynchronizeable(Synchronizeable& sync)
    134134{
    135   this->synchronizeables.remove(&sync);
     135  // removing the Synchronizeable from the List.
     136  std::list<Synchronizeable*>::iterator disconnectSynchro = std::find(this->synchronizeables.begin(), this->synchronizeables.end(), &sync);
     137  if (disconnectSynchro != this->synchronizeables.end())
     138    this->synchronizeables.erase(disconnectSynchro);
    136139
    137140  if( this->networkSockets.size()<=0 )
Note: See TracChangeset for help on using the changeset viewer.