Clean up some compiler warnings
This commit is contained in:
parent
46d1c9c72a
commit
afd354a5b8
|
@ -26,7 +26,7 @@
|
||||||
class Fl_Blink_Button : public Fl_Button
|
class Fl_Blink_Button : public Fl_Button
|
||||||
{
|
{
|
||||||
bool _on;
|
bool _on;
|
||||||
float _blink_interval;
|
int _blink_interval;
|
||||||
bool _blinking;
|
bool _blinking;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -38,7 +38,7 @@ class Fl_Blink_Button : public Fl_Button
|
||||||
void
|
void
|
||||||
update_cb ( void )
|
update_cb ( void )
|
||||||
{
|
{
|
||||||
Fl::repeat_timeout( _blink_interval, update_cb, this );
|
Fl::repeat_timeout( _blink_interval / 1000, update_cb, this );
|
||||||
|
|
||||||
_on = ! _on;
|
_on = ! _on;
|
||||||
|
|
||||||
|
@ -47,10 +47,13 @@ class Fl_Blink_Button : public Fl_Button
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static const float SLOW = 0.5f;
|
enum
|
||||||
static const float MEDIUM = 0.3f;
|
{
|
||||||
static const float FAST = 0.1f;
|
SLOW=500,
|
||||||
static const float DEFAULT = 0.5f;
|
MEDIUM=300,
|
||||||
|
FAST=100,
|
||||||
|
DEFAULT=500
|
||||||
|
};
|
||||||
|
|
||||||
Fl_Blink_Button ( int X, int Y, int W, int H, const char *L )
|
Fl_Blink_Button ( int X, int Y, int W, int H, const char *L )
|
||||||
: Fl_Button( X, Y, W, H, L )
|
: Fl_Button( X, Y, W, H, L )
|
||||||
|
@ -85,11 +88,11 @@ public:
|
||||||
void
|
void
|
||||||
blink_interval ( float v )
|
blink_interval ( float v )
|
||||||
{
|
{
|
||||||
_blink_interval = v;
|
_blink_interval = v * 1000;
|
||||||
if ( value() )
|
if ( value() )
|
||||||
{
|
{
|
||||||
Fl::remove_timeout( update_cb, this );
|
Fl::remove_timeout( update_cb, this );
|
||||||
Fl::add_timeout( _blink_interval, update_cb, this );
|
Fl::add_timeout( _blink_interval / 1000, update_cb, this );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +101,7 @@ public:
|
||||||
if ( v )
|
if ( v )
|
||||||
{
|
{
|
||||||
if ( _blinking )
|
if ( _blinking )
|
||||||
Fl::add_timeout( _blink_interval, update_cb, this );
|
Fl::add_timeout( _blink_interval / 1000, update_cb, this );
|
||||||
Fl_Button::value( v );
|
Fl_Button::value( v );
|
||||||
redraw();
|
redraw();
|
||||||
}
|
}
|
||||||
|
|
|
@ -221,7 +221,7 @@ Chain::set ( Log_Entry &e )
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Chain::log_children ( void )
|
Chain::log_children ( void ) const
|
||||||
{
|
{
|
||||||
log_create();
|
log_create();
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ public:
|
||||||
|
|
||||||
Fl_Callback * configure_outputs_callback ( void ) const { return _configure_outputs_callback; }
|
Fl_Callback * configure_outputs_callback ( void ) const { return _configure_outputs_callback; }
|
||||||
|
|
||||||
void log_children ( void );
|
virtual void log_children ( void ) const;
|
||||||
|
|
||||||
static unsigned int maximum_name_length ( void );
|
static unsigned int maximum_name_length ( void );
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,7 @@ Mixer_Strip::set ( Log_Entry &e )
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Mixer_Strip::log_children ( void )
|
Mixer_Strip::log_children ( void ) const
|
||||||
{
|
{
|
||||||
log_create();
|
log_create();
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ public:
|
||||||
|
|
||||||
void chain ( Chain *c );
|
void chain ( Chain *c );
|
||||||
|
|
||||||
void log_children ( void );
|
virtual void log_children ( void ) const;
|
||||||
|
|
||||||
virtual void color ( Fl_Color c );
|
virtual void color ( Fl_Color c );
|
||||||
virtual Fl_Color color ( void ) const;
|
virtual Fl_Color color ( void ) const;
|
||||||
|
|
|
@ -380,7 +380,8 @@ Loggable::do_this ( const char *s, bool reverse )
|
||||||
|
|
||||||
int found = sscanf( s, "%s %X %s ", classname, &id, command );
|
int found = sscanf( s, "%s %X %s ", classname, &id, command );
|
||||||
|
|
||||||
ASSERT( 3 == found, "Invalid journal entry format \"%s\"", s );
|
if ( 3 != found )
|
||||||
|
FATAL( "Invalid journal entry format \"%s\"", s );
|
||||||
|
|
||||||
const char *create, *destroy;
|
const char *create, *destroy;
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ class Loggable;
|
||||||
typedef Loggable *(create_func)(Log_Entry &, unsigned int id);
|
typedef Loggable *(create_func)(Log_Entry &, unsigned int id);
|
||||||
|
|
||||||
#define LOG_REGISTER_CREATE( class ) \
|
#define LOG_REGISTER_CREATE( class ) \
|
||||||
Loggable::register_create( #class, & class ::create );
|
Loggable::register_create( #class, & class ::create )
|
||||||
|
|
||||||
#define LOG_NAME_FUNC( class ) \
|
#define LOG_NAME_FUNC( class ) \
|
||||||
virtual const char *class_name ( void ) const { return #class ; }
|
virtual const char *class_name ( void ) const { return #class ; }
|
||||||
|
@ -56,7 +56,7 @@ typedef Loggable *(create_func)(Log_Entry &, unsigned int id);
|
||||||
r->set( e ); \
|
r->set( e ); \
|
||||||
return (Loggable *)r; \
|
return (Loggable *)r; \
|
||||||
} \
|
} \
|
||||||
LOG_NAME_FUNC( class );
|
LOG_NAME_FUNC( class )
|
||||||
|
|
||||||
|
|
||||||
#define LOG_NOT_LOGGABLE_FUNC( class ) \
|
#define LOG_NOT_LOGGABLE_FUNC( class ) \
|
||||||
|
|
|
@ -134,7 +134,7 @@ namespace OSC
|
||||||
char *
|
char *
|
||||||
Signal::get_output_connection_peer_name_and_path ( int n )
|
Signal::get_output_connection_peer_name_and_path ( int n )
|
||||||
{
|
{
|
||||||
Signal *t;
|
Signal *t = NULL;
|
||||||
|
|
||||||
int j = 0;
|
int j = 0;
|
||||||
for ( std::list<Signal*>::const_iterator i = _outgoing.begin();
|
for ( std::list<Signal*>::const_iterator i = _outgoing.begin();
|
||||||
|
@ -150,10 +150,15 @@ namespace OSC
|
||||||
|
|
||||||
// Signal *s = get_peer_signal_by_id( t->_peer, t->signal_id );
|
// Signal *s = get_peer_signal_by_id( t->_peer, t->signal_id );
|
||||||
|
|
||||||
char *r;
|
if ( t )
|
||||||
asprintf( &r, "%s:%s", t->_peer->name, t->path() );
|
{
|
||||||
|
char *r;
|
||||||
|
asprintf( &r, "%s:%s", t->_peer->name, t->path() );
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -365,7 +365,7 @@ namespace OSC
|
||||||
friend void Signal::rename ( const char *name );
|
friend void Signal::rename ( const char *name );
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
/* helper macros for defining OSC handlers */
|
/* helper macros for defining OSC handlers */
|
||||||
/* #define OSC_NAME( name ) osc_ ## name */
|
/* #define OSC_NAME( name ) osc_ ## name */
|
||||||
|
|
|
@ -101,7 +101,7 @@ warnf ( warning_t level,
|
||||||
#else
|
#else
|
||||||
#define DMESSAGE( fmt, args... )
|
#define DMESSAGE( fmt, args... )
|
||||||
#define DWARNING( fmt, args... )
|
#define DWARNING( fmt, args... )
|
||||||
#define ASSERT( pred, fmt, args... )
|
#define ASSERT( pred, fmt, args... ) (void)(pred)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* these are always defined */
|
/* these are always defined */
|
||||||
|
|
|
@ -515,7 +515,7 @@ Audio_Region::draw ( void )
|
||||||
/* overdraw a little to avoid artifacts when scrolling */
|
/* overdraw a little to avoid artifacts when scrolling */
|
||||||
W += 2;
|
W += 2;
|
||||||
|
|
||||||
Fl_Color c = selected() ? fl_invert_color( _color ) : _color;
|
// Fl_Color c = selected() ? fl_invert_color( _color ) : _color;
|
||||||
|
|
||||||
if ( sequence()->damage() & FL_DAMAGE_USER1 &&
|
if ( sequence()->damage() & FL_DAMAGE_USER1 &&
|
||||||
recording() )
|
recording() )
|
||||||
|
@ -740,7 +740,7 @@ Audio_Region::split ( nframes_t where )
|
||||||
int
|
int
|
||||||
Audio_Region::handle ( int m )
|
Audio_Region::handle ( int m )
|
||||||
{
|
{
|
||||||
static int ox, oy;
|
static int ox;
|
||||||
|
|
||||||
static bool copied = false;
|
static bool copied = false;
|
||||||
static nframes_t os;
|
static nframes_t os;
|
||||||
|
@ -802,7 +802,6 @@ Audio_Region::handle ( int m )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ox = x() - X;
|
ox = x() - X;
|
||||||
oy = y() - Y;
|
|
||||||
/* for panning */
|
/* for panning */
|
||||||
os = _r->offset;
|
os = _r->offset;
|
||||||
|
|
||||||
|
@ -855,8 +854,6 @@ Audio_Region::handle ( int m )
|
||||||
/* panning */
|
/* panning */
|
||||||
int d = (ox + X) - x();
|
int d = (ox + X) - x();
|
||||||
|
|
||||||
bool negative = d < 0;
|
|
||||||
|
|
||||||
if ( d < 0 )
|
if ( d < 0 )
|
||||||
_r->offset = os + timeline->x_to_ts( 0 - d );
|
_r->offset = os + timeline->x_to_ts( 0 - d );
|
||||||
else
|
else
|
||||||
|
|
|
@ -119,13 +119,13 @@ protected:
|
||||||
virtual void get ( Log_Entry &e ) const;
|
virtual void get ( Log_Entry &e ) const;
|
||||||
virtual void set ( Log_Entry &e );
|
virtual void set ( Log_Entry &e );
|
||||||
|
|
||||||
void draw_label ( const char *label, Fl_Align align )
|
virtual void draw_label ( const char *label, Fl_Align align, Fl_Color color=(Fl_Color)0, int xo=0, int yo=0 )
|
||||||
{
|
{
|
||||||
Sequence_Widget::draw_label( label, align );
|
Sequence_Widget::draw_label( label, align );
|
||||||
}
|
}
|
||||||
|
virtual void draw_label ( void );
|
||||||
|
|
||||||
int handle ( int m );
|
int handle ( int m );
|
||||||
void draw_label ( void );
|
|
||||||
void draw_box ( void );
|
void draw_box ( void );
|
||||||
void draw ( void );
|
void draw ( void );
|
||||||
void resize ( void );
|
void resize ( void );
|
||||||
|
|
|
@ -305,7 +305,7 @@ Control_Sequence::draw ( void )
|
||||||
bool active = active_r();
|
bool active = active_r();
|
||||||
|
|
||||||
const Fl_Color color = active ? this->color() : fl_inactive( this->color() );
|
const Fl_Color color = active ? this->color() : fl_inactive( this->color() );
|
||||||
const Fl_Color selection_color = active ? this->selection_color() : fl_inactive( this->selection_color() );
|
// const Fl_Color selection_color = active ? this->selection_color() : fl_inactive( this->selection_color() );
|
||||||
|
|
||||||
fl_rectf( X, Y, W, H, fl_color_average( FL_WHITE, FL_BACKGROUND_COLOR, 0.3 ) );
|
fl_rectf( X, Y, W, H, fl_color_average( FL_WHITE, FL_BACKGROUND_COLOR, 0.3 ) );
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ command_session_is_loaded ( void *userdata )
|
||||||
static int
|
static int
|
||||||
command_broadcast ( const char *path, lo_message msg, void *userdata )
|
command_broadcast ( const char *path, lo_message msg, void *userdata )
|
||||||
{
|
{
|
||||||
int argc = lo_message_get_argc( msg );
|
lo_message_get_argc( msg );
|
||||||
// lo_arg **argv = lo_message_get_argv( msg );
|
// lo_arg **argv = lo_message_get_argv( msg );
|
||||||
|
|
||||||
if ( !strcmp( path, "/non/hello" ) )
|
if ( !strcmp( path, "/non/hello" ) )
|
||||||
|
|
|
@ -126,6 +126,7 @@ public:
|
||||||
virtual Sequence * clone ( void )
|
virtual Sequence * clone ( void )
|
||||||
{
|
{
|
||||||
assert( 0 );
|
assert( 0 );
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Sequence * clone_empty ( void )
|
virtual Sequence * clone_empty ( void )
|
||||||
|
|
|
@ -145,8 +145,6 @@ Sequence_Region::handle ( int m )
|
||||||
{
|
{
|
||||||
static enum trim_e trimming;
|
static enum trim_e trimming;
|
||||||
|
|
||||||
static bool copied = false;
|
|
||||||
|
|
||||||
int X = Fl::event_x();
|
int X = Fl::event_x();
|
||||||
int Y = Fl::event_y();
|
int Y = Fl::event_y();
|
||||||
|
|
||||||
|
@ -207,7 +205,6 @@ Sequence_Region::handle ( int m )
|
||||||
{
|
{
|
||||||
Sequence_Widget::handle( m );
|
Sequence_Widget::handle( m );
|
||||||
|
|
||||||
copied = false;
|
|
||||||
if ( trimming != NO )
|
if ( trimming != NO )
|
||||||
trimming = NO;
|
trimming = NO;
|
||||||
|
|
||||||
|
@ -259,7 +256,7 @@ Sequence_Region::draw ( void )
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Sequence_Region::draw_label ( const char *label, Fl_Align align )
|
Sequence_Region::draw_label ( const char *label, Fl_Align align, Fl_Color color, int xo, int yo )
|
||||||
{
|
{
|
||||||
fl_color( FL_WHITE );
|
fl_color( FL_WHITE );
|
||||||
fl_font( FL_HELVETICA_ITALIC, 10 );
|
fl_font( FL_HELVETICA_ITALIC, 10 );
|
||||||
|
|
|
@ -41,7 +41,8 @@ protected:
|
||||||
virtual int handle ( int m );
|
virtual int handle ( int m );
|
||||||
virtual void draw_box( void );
|
virtual void draw_box( void );
|
||||||
virtual void draw ( void );
|
virtual void draw ( void );
|
||||||
virtual void draw_label ( const char *label, Fl_Align align );
|
virtual void draw_label ( void ) { Sequence_Widget::draw_label(); }
|
||||||
|
virtual void draw_label ( const char *label, Fl_Align align, Fl_Color color=(Fl_Color)0, int xo=0, int yo=0 );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
|
@ -309,6 +309,7 @@ public:
|
||||||
virtual void draw_box ( void );
|
virtual void draw_box ( void );
|
||||||
virtual void draw ( void );
|
virtual void draw ( void );
|
||||||
virtual void draw_label ( void );
|
virtual void draw_label ( void );
|
||||||
|
virtual void draw_label ( const char *label, Fl_Align align, Fl_Color color=(Fl_Color)0, int xo=0, int yo=0 );
|
||||||
|
|
||||||
bool
|
bool
|
||||||
operator< ( const Sequence_Widget & rhs ) const
|
operator< ( const Sequence_Widget & rhs ) const
|
||||||
|
@ -322,7 +323,6 @@ public:
|
||||||
return _r->start <= rhs._r->start;
|
return _r->start <= rhs._r->start;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void draw_label ( const char *label, Fl_Align align, Fl_Color color=(Fl_Color)0, int xo=0, int yo=0 );
|
|
||||||
virtual int handle ( int m );
|
virtual int handle ( int m );
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
|
|
@ -155,7 +155,6 @@ protected:
|
||||||
void
|
void
|
||||||
draw_background ( int X, int Y,int W, int H )
|
draw_background ( int X, int Y,int W, int H )
|
||||||
{
|
{
|
||||||
nframes_t sf = 0;
|
|
||||||
nframes_t ef = timeline->length();
|
nframes_t ef = timeline->length();
|
||||||
|
|
||||||
double ty = Y;
|
double ty = Y;
|
||||||
|
@ -311,8 +310,6 @@ Timeline::cb_scroll ( Fl_Widget *w )
|
||||||
|
|
||||||
_fpp = panzoomer->zoom();
|
_fpp = panzoomer->zoom();
|
||||||
|
|
||||||
const int tw = tracks->w() - Track::width();
|
|
||||||
|
|
||||||
panzoomer->x_value( ts_to_x( under_mouse ) );
|
panzoomer->x_value( ts_to_x( under_mouse ) );
|
||||||
|
|
||||||
redraw();
|
redraw();
|
||||||
|
@ -532,7 +529,7 @@ Timeline::menu_cb ( Fl_Menu_ *m )
|
||||||
{
|
{
|
||||||
Loggable::block_start();
|
Loggable::block_start();
|
||||||
|
|
||||||
Cursor_Region *o = new Cursor_Region( range_start(), range_end() - range_start(), "Punch", NULL );
|
new Cursor_Region( range_start(), range_end() - range_start(), "Punch", NULL );
|
||||||
reset_range();
|
reset_range();
|
||||||
|
|
||||||
Loggable::block_end();
|
Loggable::block_end();
|
||||||
|
@ -553,7 +550,7 @@ Timeline::menu_cb ( Fl_Menu_ *m )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Cursor_Region *o = new Cursor_Region( range_start(), range_end() - range_start(), "Playback", NULL );
|
new Cursor_Region( range_start(), range_end() - range_start(), "Playback", NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
reset_range();
|
reset_range();
|
||||||
|
@ -1373,7 +1370,7 @@ Timeline::draw_playhead ( void )
|
||||||
void
|
void
|
||||||
Timeline::redraw_playhead ( void )
|
Timeline::redraw_playhead ( void )
|
||||||
{
|
{
|
||||||
static nframes_t last_playhead = -1;
|
// static nframes_t last_playhead = -1;
|
||||||
static int last_playhead_x = -1;
|
static int last_playhead_x = -1;
|
||||||
|
|
||||||
/* FIXME: kind of a hackish way to invoke punch / looping stuff from the UI thread... */
|
/* FIXME: kind of a hackish way to invoke punch / looping stuff from the UI thread... */
|
||||||
|
@ -1439,7 +1436,7 @@ Timeline::redraw_playhead ( void )
|
||||||
if ( last_playhead_x != playhead_x )
|
if ( last_playhead_x != playhead_x )
|
||||||
{
|
{
|
||||||
redraw_overlay();
|
redraw_overlay();
|
||||||
last_playhead = transport->frame;
|
// last_playhead = transport->frame;
|
||||||
last_playhead_x = playhead_x;
|
last_playhead_x = playhead_x;
|
||||||
|
|
||||||
if ( follow_playhead )
|
if ( follow_playhead )
|
||||||
|
|
|
@ -102,7 +102,7 @@ class Timeline : public Fl_Single_Window, public RWLock
|
||||||
|
|
||||||
static void draw_clip ( void * v, int X, int Y, int W, int H );
|
static void draw_clip ( void * v, int X, int Y, int W, int H );
|
||||||
|
|
||||||
int _old_xposition;
|
nframes_t _old_xposition;
|
||||||
int _old_yposition;
|
int _old_yposition;
|
||||||
|
|
||||||
Rectangle _selection;
|
Rectangle _selection;
|
||||||
|
|
|
@ -865,13 +865,10 @@ Track::draw ( void )
|
||||||
|
|
||||||
fl_clip_box( x(), y(), w(), h(), X, Y, W, H );
|
fl_clip_box( x(), y(), w(), h(), X, Y, W, H );
|
||||||
|
|
||||||
Fl_Color saved_color;
|
Fl_Color saved_color = color();
|
||||||
|
|
||||||
if ( ! Track::colored_tracks )
|
if ( ! Track::colored_tracks )
|
||||||
{
|
|
||||||
saved_color = color();
|
|
||||||
color( FL_GRAY );
|
color( FL_GRAY );
|
||||||
}
|
|
||||||
|
|
||||||
if ( _selected )
|
if ( _selected )
|
||||||
{
|
{
|
||||||
|
|
|
@ -122,8 +122,6 @@ Waveform::draw ( int X, int Y, int W, int H,
|
||||||
|
|
||||||
fl_begin_line();
|
fl_begin_line();
|
||||||
|
|
||||||
unsigned long end = start + W;
|
|
||||||
|
|
||||||
j = start;
|
j = start;
|
||||||
|
|
||||||
for ( int x = X; x < X + W; x++, j += skip )
|
for ( int x = X; x < X + W; x++, j += skip )
|
||||||
|
|
Loading…
Reference in New Issue