diff options
author | Carl Hetherington <carl@carlh.net> | 2011-02-07 01:13:03 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-02-07 01:13:03 +0000 |
commit | 7ba6f98f9ceb98404e6d89dcb65ada707cb07be9 (patch) | |
tree | 34c9ffc8b6cdae61a00977eaaa6c45cfd3fa1add /gtk2_ardour | |
parent | ad1f38c0a232ff31e4221a3e7fad75e0b785ae2e (diff) |
No-op; small tidy-ups.
git-svn-id: svn://localhost/ardour2/branches/3.0@8735 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/ardour_ui2.cc | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc index 1a9b7e53dd..a55f62976e 100644 --- a/gtk2_ardour/ardour_ui2.cc +++ b/gtk2_ardour/ardour_ui2.cc @@ -780,7 +780,7 @@ ARDOUR_UI::shuttle_box_motion (GdkEventMotion* ev) gint ARDOUR_UI::mouse_shuttle (double x, bool force) { - double half_width = shuttle_box.get_width() / 2.0; + double const half_width = shuttle_box.get_width() / 2.0; double distance = x - half_width; if (distance > 0) { @@ -820,20 +820,14 @@ ARDOUR_UI::use_shuttle_fract (bool force) if (Config->get_shuttle_units() == Semitones) { - const double step = 1.0 / 24.0; // range is 24 semitones up & down - double semitones; - - semitones = round (shuttle_fract / step); + double const step = 1.0 / 24.0; // range is 24 semitones up & down + double const semitones = round (shuttle_fract / step); speed = pow (2.0, (semitones / 12.0)); } else { - bool neg; - double fract; - - neg = (shuttle_fract < 0.0); - - fract = 1 - sqrt (1 - (shuttle_fract * shuttle_fract)); // Formula A1 + bool const neg = (shuttle_fract < 0.0); + double fract = 1 - sqrt (1 - (shuttle_fract * shuttle_fract)); // Formula A1 if (neg) { fract = -fract; |