From 1a400d076a32bd763ad1b82b0eb142cac5950234 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Tue, 20 May 2008 00:18:10 -0500 Subject: [PATCH] Clean up some compiler warnings. --- event.C | 3 +-- grid.C | 21 ++------------------- grid.H | 8 ++------ gui/draw.C | 2 +- midievent.H | 2 +- pattern.C | 4 ++-- phrase.C | 2 +- transport.C | 2 +- 8 files changed, 11 insertions(+), 33 deletions(-) diff --git a/event.C b/event.C index 931f2fa..9a4c7f9 100644 --- a/event.C +++ b/event.C @@ -42,9 +42,8 @@ event::~event ( void ) } /* copy constructor */ -event::event ( const event &e ) +event::event ( const event &e ) : midievent( e ) { - *this = e; _link = _next = _prev = NULL; } diff --git a/grid.C b/grid.C index 3414d48..9b48649 100644 --- a/grid.C +++ b/grid.C @@ -72,7 +72,7 @@ Grid::~Grid ( void ) } /* copy constructor */ -Grid::Grid ( const Grid &rhs ) +Grid::Grid ( const Grid &rhs ) : sigc::trackable() { _rd = new data( *rhs._rd ); _rw = NULL; @@ -620,21 +620,9 @@ Grid::_relink ( void ) _rw->events.relink(); } -void -Grid::record_event ( event *e ) -{ - WARNING( "unimplemented" ); -/* lock(); */ - -/* _rw->events.push_back( *e ); */ -/* _rw->events.sort(); */ - -/* unlock(); */ -} - /* Dump the event list -- used by pattern / phrase dumppers */ void -Grid::dump ( smf *f, int channel, bool translate ) const +Grid::dump ( smf *f, int channel ) const { data *d = const_cast(_rd); @@ -642,14 +630,9 @@ Grid::dump ( smf *f, int channel, bool translate ) const for ( event *e = d->events.first(); e; e = e->next() ) { - // e->print(); me = *e; me.channel( channel ); -/* if ( me.is_note_on() || me.is_note_off() ) */ -/* if ( translate ) */ -/* d->mapping.translate( &me ); */ - f->write_event( &me ); } } diff --git a/grid.H b/grid.H index 39a72d7..8e2134a 100644 --- a/grid.H +++ b/grid.H @@ -104,9 +104,6 @@ class Grid : public trackable protected: - - - unsigned int _height; char *_notes; char *_name; @@ -155,8 +152,7 @@ public: Viewport viewport; /* used by the Canvas */ Grid ( void ); - // FIXME: needs to be virtual? - ~Grid ( void ); + virtual ~Grid ( void ); Grid ( const Grid &rhs ); int y_to_note ( int y ) const; @@ -226,7 +222,7 @@ public: void resolution ( unsigned int n ); int resolution ( void ) const; - void dump ( smf *f, int channel, bool translate ) const; + void dump ( smf *f, int channel ) const; void draw ( Canvas *c, int bx, int by, int bw, int bh ); void print ( void ) const; diff --git a/gui/draw.C b/gui/draw.C index ed4879e..8fb0b74 100644 --- a/gui/draw.C +++ b/gui/draw.C @@ -223,7 +223,7 @@ extern UI *ui; static void -clear_status ( void *arg ) +clear_status ( void * ) { ui->status->value( "" ); } diff --git a/midievent.H b/midievent.H index a365d2e..1164c90 100644 --- a/midievent.H +++ b/midievent.H @@ -89,7 +89,7 @@ public: }; midievent ( void ); - ~midievent ( void ); + virtual ~midievent ( void ); tick_t timestamp ( void ) const; void timestamp ( tick_t time ); diff --git a/pattern.C b/pattern.C index 4503e85..ffb12f6 100644 --- a/pattern.C +++ b/pattern.C @@ -545,7 +545,7 @@ pattern::save ( const char *name ) const f.open_track( _name, _number ); - Grid::dump( &f, _channel, true ); + Grid::dump( &f, _channel ); f.close_track( length() ); } @@ -558,7 +558,7 @@ pattern::dump ( smf *f ) const f->write_pattern_info( this ); - Grid::dump( f, _channel, false ); + Grid::dump( f, _channel ); f->close_track( length() ); } diff --git a/phrase.C b/phrase.C index b0b04b9..69952ef 100644 --- a/phrase.C +++ b/phrase.C @@ -284,7 +284,7 @@ phrase::dump ( smf *f ) f->cue( true ); - Grid::dump( f, 0, false ); + Grid::dump( f, 0 ); f->close_track( length() ); } diff --git a/transport.C b/transport.C index 44dd59c..9a5d891 100644 --- a/transport.C +++ b/transport.C @@ -46,7 +46,7 @@ static volatile bool _done; * number of 1920 ticks_per_beat in an attempt to reduce the magnitude * of the error. Currently, we keep this behaviour. */ void -Transport::timebase ( jack_transport_state_t state, jack_nframes_t nframes, jack_position_t *pos, int new_pos, void *arg ) +Transport::timebase ( jack_transport_state_t, jack_nframes_t nframes, jack_position_t *pos, int new_pos, void * ) { if ( new_pos || ! _done )