Remove boost::lambda from ConditionalOverlayCell::get_validity
This commit is contained in:
committed by
Keith Winstein
parent
83694977a7
commit
8f099cafbb
@@ -29,6 +29,8 @@
|
||||
using namespace boost::lambda;
|
||||
using namespace Overlay;
|
||||
using std::max;
|
||||
using std::mem_fun_ref;
|
||||
using std::bind2nd;
|
||||
|
||||
void ConditionalOverlayCell::apply( Framebuffer &fb, uint64_t confirmed_epoch, int row, bool flag ) const
|
||||
{
|
||||
@@ -88,12 +90,10 @@ Validity ConditionalOverlayCell::get_validity( const Framebuffer &fb, int row,
|
||||
return CorrectNoCredit;
|
||||
}
|
||||
|
||||
if ( (current.contents == replacement.contents)
|
||||
|| (current.is_blank() && replacement.is_blank()) ) {
|
||||
if ( current.contents_match( replacement ) ) {
|
||||
vector<Cell>::const_iterator it =
|
||||
find_if( original_contents.begin(), original_contents.end(),
|
||||
(replacement.is_blank() && bind( &Cell::is_blank, _1 ))
|
||||
|| replacement.contents == (&_1)->*&Cell::contents );
|
||||
bind2nd( mem_fun_ref( &Cell::contents_match ), replacement ) );
|
||||
if ( it == original_contents.end() ) {
|
||||
return Correct;
|
||||
} else {
|
||||
|
||||
@@ -96,6 +96,12 @@ namespace Terminal {
|
||||
|| ( (contents.size() == 1) && ( (contents.front() == 0x20)
|
||||
|| (contents.front() == 0xA0) ) ) );
|
||||
}
|
||||
|
||||
bool contents_match ( const Cell& other ) const
|
||||
{
|
||||
return ( is_blank() && other.is_blank() )
|
||||
|| ( contents == other.contents );
|
||||
}
|
||||
};
|
||||
|
||||
class Row {
|
||||
|
||||
Reference in New Issue
Block a user