From 04d8bd6a8d3208d1a98a873d20b31e80e4a9be8c Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Tue, 12 Mar 2013 17:55:28 -0700 Subject: [PATCH] Timeline: Fix sign warnings in grid snapping code. --- timeline/src/Timeline.C | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/timeline/src/Timeline.C b/timeline/src/Timeline.C index 5dcf979..9fb5173 100644 --- a/timeline/src/Timeline.C +++ b/timeline/src/Timeline.C @@ -864,12 +864,12 @@ Timeline::nearest_line ( nframes_t *frame, bool snap ) const 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, 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; else { @@ -886,7 +886,7 @@ Timeline::next_line ( nframes_t *frame, bool bar ) const { 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 ); @@ -907,11 +907,11 @@ Timeline::prev_line ( nframes_t *frame, bool bar ) const { 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 ); - if ( n.closest == (nframes_t)-1 ) + if ( n.closest == JACK_MAX_FRAMES ) return false; else {