C++03 bound functions are not available in C++17; remove
This makes me a little sad, it's time to move to C++11 or greater.
This commit is contained in:
@@ -360,12 +360,23 @@ void TransportSender<MyState>::process_acknowledgment_through( uint64_t ack_num
|
||||
{
|
||||
/* Ignore ack if we have culled the state it's acknowledging */
|
||||
|
||||
if ( sent_states.end() !=
|
||||
find_if( sent_states.begin(), sent_states.end(),
|
||||
bind2nd( mem_fun_ref( &TimestampedState<MyState>::num_eq ), ack_num ) ) ) {
|
||||
sent_states.remove_if( bind2nd( mem_fun_ref( &TimestampedState<MyState>::num_lt ), ack_num ) );
|
||||
typename sent_states_type::const_iterator i;
|
||||
for ( i = sent_states.begin(); i != sent_states.end(); i++ ) {
|
||||
if ( i->num == ack_num ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( i != sent_states.end() ) {
|
||||
for ( i = sent_states.begin(); i != sent_states.end(); ) {
|
||||
typename sent_states_type::const_iterator i_next = i;
|
||||
i_next++;
|
||||
if ( i->num < ack_num ) {
|
||||
sent_states.erase( i );
|
||||
}
|
||||
i = i_next;
|
||||
}
|
||||
}
|
||||
assert( !sent_states.empty() );
|
||||
}
|
||||
|
||||
|
||||
@@ -45,10 +45,6 @@ namespace Network {
|
||||
TimestampedState( uint64_t s_timestamp, uint64_t s_num, const State &s_state )
|
||||
: timestamp( s_timestamp ), num( s_num ), state( s_state )
|
||||
{}
|
||||
|
||||
/* For use with find_if, remove_if */
|
||||
bool num_eq( uint64_t v ) const { return num == v; }
|
||||
bool num_lt( uint64_t v ) const { return num < v; }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user