Use an enum for RoundMode instead of magic numbers.

No functional changes in this one (for easier auditing), but towards having
round up/down only if necessary modes, rather than kludging around that
situation with a double round as we do currently.
This commit is contained in:
David Robillard 2014-11-16 01:05:21 -05:00
parent 9c5e63bcc6
commit fd9ccc7058
14 changed files with 60 additions and 35 deletions

View file

@ -6463,7 +6463,7 @@ Editor::playhead_forward_to_grid ()
framepos_t pos = playhead_cursor->current_frame ();
if (pos < max_framepos - 1) {
pos += 2;
snap_to_internal (pos, 1, false);
snap_to_internal (pos, RoundUpAlways, false);
_session->request_locate (pos);
}
}
@ -6479,7 +6479,7 @@ Editor::playhead_backward_to_grid ()
framepos_t pos = playhead_cursor->current_frame ();
if (pos > 2) {
pos -= 2;
snap_to_internal (pos, -1, false);
snap_to_internal (pos, RoundDownAlways, false);
_session->request_locate (pos);
}
}