Remove boost::lambda from PredictionEngine::get_or_make_row
This commit is contained in:
committed by
Keith Winstein
parent
5f1bc88ed8
commit
06fa8eaedb
@@ -538,8 +538,9 @@ void PredictionEngine::cull( const Framebuffer &fb )
|
||||
|
||||
ConditionalOverlayRow & PredictionEngine::get_or_make_row( int row_num, int num_cols )
|
||||
{
|
||||
overlays_t::iterator it = find_if( overlays.begin(), overlays.end(),
|
||||
(&_1)->*&ConditionalOverlayRow::row_num == row_num );
|
||||
overlays_t::iterator it =
|
||||
find_if( overlays.begin(), overlays.end(),
|
||||
bind2nd( mem_fun_ref( &ConditionalOverlayRow::row_num_eq ), row_num ) );
|
||||
|
||||
if ( it != overlays.end() ) {
|
||||
return *it;
|
||||
|
||||
@@ -117,6 +117,9 @@ namespace Overlay {
|
||||
|
||||
void apply( Framebuffer &fb, uint64_t confirmed_epoch, bool flag ) const;
|
||||
|
||||
/* For use with find_if */
|
||||
bool row_num_eq( int v ) const { return row_num == v; }
|
||||
|
||||
ConditionalOverlayRow( int s_row_num ) : row_num( s_row_num ), overlay_cells() {}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user