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 )
|
void PredictionEngine::kill_epoch( uint64_t epoch, const Framebuffer &fb )
|
||||||
{
|
{
|
||||||
for( cursors_type::const_iterator it = cursors.begin(); it != cursors.end(); ) {
|
for( cursors_type::iterator it = cursors.begin(); it != cursors.end(); ) {
|
||||||
cursors_type::const_iterator it_next = it;
|
cursors_type::iterator it_next = it;
|
||||||
it_next++;
|
it_next++;
|
||||||
if ( it->tentative( epoch - 1 )) {
|
if ( it->tentative( epoch - 1 )) {
|
||||||
cursors.erase( it );
|
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 */
|
/* 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++ ) {
|
for ( i = sent_states.begin(); i != sent_states.end(); i++ ) {
|
||||||
if ( i->num == ack_num ) {
|
if ( i->num == ack_num ) {
|
||||||
break;
|
break;
|
||||||
@@ -369,7 +369,7 @@ void TransportSender<MyState>::process_acknowledgment_through( uint64_t ack_num
|
|||||||
|
|
||||||
if ( i != sent_states.end() ) {
|
if ( i != sent_states.end() ) {
|
||||||
for ( i = sent_states.begin(); 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++;
|
i_next++;
|
||||||
if ( i->num < ack_num ) {
|
if ( i->num < ack_num ) {
|
||||||
sent_states.erase( i );
|
sent_states.erase( i );
|
||||||
|
|||||||
Reference in New Issue
Block a user