From 04bb452e27caa119443a9c8b21290de96f4b3fd3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 15 Mar 2011 01:19:43 +0000 Subject: [PATCH] Fix undefined operations (according to gcc 4.5.2). git-svn-id: svn://localhost/ardour2/branches/3.0@9153 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/tempo.cc | 9 +++++---- 1 file 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; } -- 2.30.2