Changeset 84:8564e024e4ad in finroc_plugins_data_ports


Ignore:
Timestamp:
24.01.2015 20:52:31 (5 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
13.10
Children:
85:b0cb42d24e96, 90:8d0cefd29e09
Phase:
public
Message:

Fixed bug (erroneous use of std::vector::erase in uncritical loop)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • optimized/tThreadLocalBufferPools.cpp

    r46 r84  
    9393  { 
    9494    rrlib::thread::tLock lock(mutex); 
    95     for (auto it = garbage_pools.begin(); it != garbage_pools.end(); ++it) 
     95    for (auto it = garbage_pools.begin(); it != garbage_pools.end();) 
    9696    { 
    9797      if ((*it)->DeleteAllGarbage(false)) 
     
    100100        it = garbage_pools.erase(it); 
    101101      } 
     102      else 
     103      { 
     104        ++it; 
     105      } 
    102106    } 
    103107  } 
Note: See TracChangeset for help on using the changeset viewer.