Timeline: Fix sign warnings in grid snapping code.

This commit is contained in:
Jonathan Moore Liles 2013-03-12 17:55:28 -07:00
parent 252b105e67
commit 04d8bd6a8d
1 changed files with 5 additions and 5 deletions

View File

@ -864,12 +864,12 @@ Timeline::nearest_line ( nframes_t *frame, bool snap ) const
nframes_t when = *frame; nframes_t when = *frame;
nearest_line_arg n = { when, -1, snap && Timeline::Bars == Timeline::snap_to }; nearest_line_arg n = { when, JACK_MAX_FRAMES, snap && Timeline::Bars == Timeline::snap_to };
render_tempomap( when > x_to_ts( w() >> 1 ) ? when - x_to_ts( w() >> 1 ) : 0, render_tempomap( when > x_to_ts( w() >> 1 ) ? when - x_to_ts( w() >> 1 ) : 0,
when + x_to_ts( w() >> 1 ), snap ? nearest_line_snap_cb : nearest_line_cb, &n ); when + x_to_ts( w() >> 1 ), snap ? nearest_line_snap_cb : nearest_line_cb, &n );
if ( n.closest == (nframes_t)-1 ) if ( n.closest == JACK_MAX_FRAMES )
return false; return false;
else else
{ {
@ -886,7 +886,7 @@ Timeline::next_line ( nframes_t *frame, bool bar ) const
{ {
nframes_t when = *frame + 1; nframes_t when = *frame + 1;
nearest_line_arg n = { when, -1, bar }; nearest_line_arg n = { when, JACK_MAX_FRAMES, bar };
render_tempomap( when, x_to_ts( w() ), prev_next_line_cb, &n ); render_tempomap( when, x_to_ts( w() ), prev_next_line_cb, &n );
@ -907,11 +907,11 @@ Timeline::prev_line ( nframes_t *frame, bool bar ) const
{ {
nframes_t when = *frame - 1; nframes_t when = *frame - 1;
nearest_line_arg n = { when, -1, bar }; nearest_line_arg n = { when, 0, bar };
render_tempomap( xoffset, when - xoffset, prev_next_line_cb, &n ); render_tempomap( xoffset, when - xoffset, prev_next_line_cb, &n );
if ( n.closest == (nframes_t)-1 ) if ( n.closest == JACK_MAX_FRAMES )
return false; return false;
else else
{ {