Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8314


Ignore:
Timestamp:
Apr 23, 2011, 10:56:00 AM (13 years ago)
Author:
scheusso
Message:

clarification of an assertion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/network/synchronisable/Synchronisable.h

    r7801 r8314  
    215215  }
    216216 
    217   template <class T> void Synchronisable::unregisterVariable(T& variable){
     217  template <class T> void Synchronisable::unregisterVariable(T& variable)
     218  {
    218219    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      {
    221224        this->dataSize_ -= (*it)->getSize(Synchronisable::state_);
    222225        delete (*it);
     
    227230        it++;
    228231    }
    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:
    231234    // the variable has not been registered before
    232235  }
Note: See TracChangeset for help on using the changeset viewer.