Replace one find_if with a loop

g++/libstdc++ 4.1.2 is unhappy with this use of bind2nd, possibly because the
argument is a reference.  This is a problem for EL5.
This commit is contained in:
Keegan McAllister
2012-04-11 23:37:56 -04:00
committed by Keith Winstein
parent 8bcc001b52
commit 280400152d
+5 -3
View File
@@ -88,9 +88,11 @@ Validity ConditionalOverlayCell::get_validity( const Framebuffer &fb, int row,
} }
if ( current.contents_match( replacement ) ) { if ( current.contents_match( replacement ) ) {
vector<Cell>::const_iterator it = vector<Cell>::const_iterator it = original_contents.begin();
find_if( original_contents.begin(), original_contents.end(), for ( ; it != original_contents.end(); it++ ) {
bind2nd( mem_fun_ref( &Cell::contents_match ), replacement ) ); if ( it->contents_match( replacement ) )
break;
}
if ( it == original_contents.end() ) { if ( it == original_contents.end() ) {
return Correct; return Correct;
} else { } else {