Browse Source

Oops. Fix Log_Entry diff'ing.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
0eeb63749f
3 changed files with 9 additions and 9 deletions
  1. +7
    -7
      Timeline/Log_Entry.C
  2. +1
    -1
      Timeline/Log_Entry.H
  3. +1
    -1
      Timeline/Loggable.C

+ 7
- 7
Timeline/Log_Entry.C 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


+ 1
- 1
Timeline/Log_Entry.H 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;



+ 1
- 1
Timeline/Loggable.C 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 );



Loading…
Cancel
Save