Remove boost::lambda from transportsender.cc
This commit is contained in:
committed by
Keith Winstein
parent
8bc9aa33bf
commit
83694977a7
@@ -16,7 +16,6 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <boost/lambda/lambda.hpp>
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -26,7 +25,6 @@
|
|||||||
#include "transportsender.h"
|
#include "transportsender.h"
|
||||||
#include "transportfragment.h"
|
#include "transportfragment.h"
|
||||||
|
|
||||||
using namespace boost::lambda;
|
|
||||||
using namespace Network;
|
using namespace Network;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@@ -312,9 +310,10 @@ 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 */
|
||||||
|
|
||||||
if ( sent_states.end() != find_if( sent_states.begin(), sent_states.end(),
|
if ( sent_states.end() !=
|
||||||
(&_1)->*&TimestampedState<MyState>::num == ack_num ) ) {
|
find_if( sent_states.begin(), sent_states.end(),
|
||||||
sent_states.remove_if( (&_1)->*&TimestampedState<MyState>::num < ack_num );
|
bind2nd( mem_fun_ref( &TimestampedState<MyState>::num_eq ), ack_num ) ) ) {
|
||||||
|
sent_states.remove_if( bind2nd( mem_fun_ref( &TimestampedState<MyState>::num_lt ), ack_num ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
assert( !sent_states.empty() );
|
assert( !sent_states.empty() );
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ namespace Network {
|
|||||||
TimestampedState( uint64_t s_timestamp, uint64_t s_num, State &s_state )
|
TimestampedState( uint64_t s_timestamp, uint64_t s_num, State &s_state )
|
||||||
: timestamp( s_timestamp ), num( s_num ), 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