Fix error in ASSERT macro.

This commit is contained in:
Jonathan Moore Liles 2008-02-12 13:23:57 -06:00
parent 70d576a6e4
commit 39423ef8de
2 changed files with 2 additions and 2 deletions

View File

@ -100,7 +100,7 @@ warnf ( warning_t level,
#ifndef NDEBUG #ifndef NDEBUG
#define DEBUG( fmt, args... ) warnf( W_MESSAGE, __MODULE__, __FILE__, __FUNCTION__, __LINE__, fmt, ## args ) #define DEBUG( fmt, args... ) warnf( W_MESSAGE, __MODULE__, __FILE__, __FUNCTION__, __LINE__, fmt, ## args )
#define ASSERT( pred, fmt, args... ) ( do { if ( ! (pred) ) warnf( W_ASSERTION, __MODULE__, __FILE__, __FUNCTION__, __LINE__, fmd, ## args ); abort(); } while ( 0 ) ) #define ASSERT( pred, fmt, args... ) do { if ( ! (pred) ) { warnf( W_ASSERTION, __MODULE__, __FILE__, __FUNCTION__, __LINE__, fmt, ## args ); abort(); } } while ( 0 )
#else #else
#define DEBUG( fmt, args... ) #define DEBUG( fmt, args... )
#define ASSERT( pred, fmt, args... ) #define ASSERT( pred, fmt, args... )

2
grid.C
View File

@ -634,8 +634,8 @@ Grid::draw ( Canvas *c, int bx, int by, int bw, int bh )
if ( ! e->is_note_on() ) if ( ! e->is_note_on() )
continue; continue;
tick_t ts = e->timestamp(); tick_t ts = e->timestamp();
ASSERT( e->link(), "found a non-linked note" ); ASSERT( e->link(), "found a non-linked note" );
tick_t tse = e->link()->timestamp(); tick_t tse = e->link()->timestamp();