diff options
author | David Robillard <d@drobilla.net> | 2011-03-15 01:19:43 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-03-15 01:19:43 +0000 |
commit | 04bb452e27caa119443a9c8b21290de96f4b3fd3 (patch) | |
tree | e2c643daf0cfbf834b4fcd89a241721010c31b7b | |
parent | be3002c239219e0829dc24ae7e1f93af557c4cf8 (diff) |
Fix undefined operations (according to gcc 4.5.2).
git-svn-id: svn://localhost/ardour2/branches/3.0@9153 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | libs/ardour/tempo.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index 83f5e3d080..e1ef6f2685 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -1051,8 +1051,8 @@ TempoMap::bbt_duration_at_unlocked (const BBT_Time& when, const BBT_Time& bbt, i /* count beats */ while( b > when.beats ) { - - result.bars = max(1U,result.bars-- ) ; + --result.bars; + result.bars = max(1U, result.bars); metric = metric_at(result); // maybe there is a meter change beats_per_bar = metric.meter().beats_per_bar(); if (b >= ceil(beats_per_bar)) { @@ -1076,13 +1076,14 @@ TempoMap::bbt_duration_at_unlocked (const BBT_Time& when, const BBT_Time& bbt, i do { if (result.beats == 1) { - result.bars = max(1U, result.bars-- ) ; + --result.bars; + result.bars = max(1U, result.bars) ; metric = metric_at(result); // maybe there is a meter change beats_per_bar = metric.meter().beats_per_bar(); result.beats = (uint32_t) ceil(beats_per_bar); ticks_at_beat = (uint32_t) ((1 - (ceil(beats_per_bar) - beats_per_bar)) * BBT_Time::ticks_per_beat) ; } else { - result.beats --; + --result.beats; ticks_at_beat = (uint32_t) BBT_Time::ticks_per_beat; } |