mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
NO-OP: cleanup snap-to code, mostly whitespace
This commit is contained in:
parent
3a2f0e40cf
commit
6b9bdbf0ff
1 changed files with 12 additions and 13 deletions
|
|
@ -2690,7 +2690,7 @@ Editor::snap_to (MusicSample& start, RoundMode direction, SnapPref pref, bool en
|
|||
snap_to_internal (start, direction, pref, ensure_snap);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
check_best_snap (samplepos_t presnap, samplepos_t &test, samplepos_t &dist, samplepos_t &best)
|
||||
{
|
||||
samplepos_t diff = abs (test - presnap);
|
||||
|
|
@ -2971,6 +2971,7 @@ Editor::snap_to_marker (samplepos_t presnap, RoundMode direction)
|
|||
void
|
||||
Editor::snap_to_internal (MusicSample& start, RoundMode direction, SnapPref pref, bool ensure_snap)
|
||||
{
|
||||
UIConfiguration const& uic (UIConfiguration::instance ());
|
||||
const samplepos_t presnap = start.sample;
|
||||
|
||||
samplepos_t test = max_samplepos; // for each snap, we'll use this value
|
||||
|
|
@ -2978,13 +2979,11 @@ Editor::snap_to_internal (MusicSample& start, RoundMode direction, SnapPref pref
|
|||
samplepos_t best = max_samplepos; // this records the best snap-result we've found so far
|
||||
|
||||
/* check snap-to-marker */
|
||||
if ((pref == SnapToAny_Visual) && UIConfiguration::instance().get_snap_to_marks()) {
|
||||
if ((pref == SnapToAny_Visual) && uic.get_snap_to_marks ()) {
|
||||
test = snap_to_marker (presnap, direction);
|
||||
check_best_snap (presnap, test, dist, best);
|
||||
}
|
||||
|
||||
const UIConfiguration& uic (UIConfiguration::instance());
|
||||
|
||||
/* check snap-to-region-{start/end/sync} */
|
||||
if ((pref == SnapToAny_Visual) && (uic.get_snap_to_region_start () || uic.get_snap_to_region_end () || uic.get_snap_to_region_sync ())) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue