Fix more inappropriate const_iterator usage.
This commit is contained in:
@@ -378,8 +378,8 @@ void PredictionEngine::apply( Framebuffer &fb ) const
|
||||
|
||||
void PredictionEngine::kill_epoch( uint64_t epoch, const Framebuffer &fb )
|
||||
{
|
||||
for( cursors_type::const_iterator it = cursors.begin(); it != cursors.end(); ) {
|
||||
cursors_type::const_iterator it_next = it;
|
||||
for( cursors_type::iterator it = cursors.begin(); it != cursors.end(); ) {
|
||||
cursors_type::iterator it_next = it;
|
||||
it_next++;
|
||||
if ( it->tentative( epoch - 1 )) {
|
||||
cursors.erase( it );
|
||||
|
||||
@@ -360,7 +360,7 @@ void TransportSender<MyState>::process_acknowledgment_through( uint64_t ack_num
|
||||
{
|
||||
/* Ignore ack if we have culled the state it's acknowledging */
|
||||
|
||||
typename sent_states_type::const_iterator i;
|
||||
typename sent_states_type::iterator i;
|
||||
for ( i = sent_states.begin(); i != sent_states.end(); i++ ) {
|
||||
if ( i->num == ack_num ) {
|
||||
break;
|
||||
@@ -369,7 +369,7 @@ void TransportSender<MyState>::process_acknowledgment_through( uint64_t ack_num
|
||||
|
||||
if ( i != sent_states.end() ) {
|
||||
for ( i = sent_states.begin(); i != sent_states.end(); ) {
|
||||
typename sent_states_type::const_iterator i_next = i;
|
||||
typename sent_states_type::iterator i_next = i;
|
||||
i_next++;
|
||||
if ( i->num < ack_num ) {
|
||||
sent_states.erase( i );
|
||||
|
||||
Reference in New Issue
Block a user