summaryrefslogtreecommitdiff
path: root/libs/ardour/tempo.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-11-16 01:05:21 -0500
committerDavid Robillard <d@drobilla.net>2014-11-16 22:35:45 -0500
commitfd9ccc7058cf7cfadbfa1dfb9676e2de3a14e1b0 (patch)
treeb65c03818c9eded429651ca621773d728f9e1976 /libs/ardour/tempo.cc
parent9c5e63bcc69290e1df84ea345b1899a241b7655e (diff)
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.
Diffstat (limited to 'libs/ardour/tempo.cc')
-rw-r--r--libs/ardour/tempo.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc
index 6f3f734116..77128bd0c2 100644
--- a/libs/ardour/tempo.cc
+++ b/libs/ardour/tempo.cc
@@ -1223,19 +1223,19 @@ TempoMap::bbt_duration_at_unlocked (const BBT_Time& when, const BBT_Time& bbt, i
}
framepos_t
-TempoMap::round_to_bar (framepos_t fr, int dir)
+TempoMap::round_to_bar (framepos_t fr, RoundMode dir)
{
return round_to_type (fr, dir, Bar);
}
framepos_t
-TempoMap::round_to_beat (framepos_t fr, int dir)
+TempoMap::round_to_beat (framepos_t fr, RoundMode dir)
{
return round_to_type (fr, dir, Beat);
}
framepos_t
-TempoMap::round_to_beat_subdivision (framepos_t fr, int sub_num, int dir)
+TempoMap::round_to_beat_subdivision (framepos_t fr, int sub_num, RoundMode dir)
{
require_map_to (fr);
@@ -1354,7 +1354,7 @@ TempoMap::round_to_beat_subdivision (framepos_t fr, int sub_num, int dir)
}
framepos_t
-TempoMap::round_to_type (framepos_t frame, int dir, BBTPointType type)
+TempoMap::round_to_type (framepos_t frame, RoundMode dir, BBTPointType type)
{
require_map_to (frame);