Oops. Fix Log_Entry diff'ing.

This commit is contained in:
Jonathan Moore Liles 2008-06-05 22:26:51 -05:00
parent ea38dd48b9
commit 0eeb63749f
3 changed files with 9 additions and 9 deletions

View File

@ -166,8 +166,11 @@ Log_Entry::parse_alist( const char *s )
/** compare elements of dumps s1 and s2, removing those elements
of dst which are not changed from src */
bool
Log_Entry::log_diff ( char **sa1, char **sa2 )
Log_Entry::diff ( Log_Entry *e1, Log_Entry *e2 )
{
char **sa1 = e1->_sa;
char **sa2 = e2->_sa;
if ( ! sa1 )
return true;
@ -194,13 +197,10 @@ Log_Entry::log_diff ( char **sa1, char **sa2 )
sa1[ w ] = NULL;
sa2[ w ] = NULL;
return w == 0 ? false : true;
}
e1->_i = w;
e2->_i = w;
bool
Log_Entry::operator!= ( const Log_Entry &rhs ) const
{
return log_diff( this->_sa, rhs._sa );
return w == 0 ? false : true;
}
void

View File

@ -60,7 +60,7 @@ public:
/* Examination */
/***************/
bool operator!= ( const Log_Entry &rhs ) const;
static bool diff ( Log_Entry *e1, Log_Entry *e2 );
int size ( void ) const;

View File

@ -603,7 +603,7 @@ Loggable::log_end ( void )
get( *new_state );
if ( *_old_state != *new_state )
if ( Log_Entry::diff( _old_state, new_state ) )
{
log( "%s 0x%X set ", class_name(), _id );