Fix more inappropriate const_iterator usage.

This commit is contained in:
John Hood
2018-08-03 19:39:08 -04:00
parent 9a606c2f3d
commit 4aff80b872
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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 );
+2 -2
View File
@@ -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 );