NOOP: change code pattern to return early from conditional rather than leaving body inside true condition scope

This commit is contained in:
Paul Davis 2022-01-06 12:07:22 -07:00
parent 0baf0d859d
commit 436b81be9a

View File

@ -610,7 +610,14 @@ Trigger::maybe_compute_next_transition (samplepos_t start_sample, Temporal::Beat
/* See if this time falls within the range of time given to us */
if (transition_time.beats() >= start && transition_time < end) {
if (transition_time.beats() < start || transition_time > end) {
/* retrigger time has not been reached, just continue
to play normally until then.
*/
return extra_offset;
}
/* transition time has arrived! let's figure out what're doing:
* stopping, starting, retriggering
@ -677,14 +684,6 @@ Trigger::maybe_compute_next_transition (samplepos_t start_sample, Temporal::Beat
abort();
}
} else {
/* retrigger time has not been reached, just continue
to play normally until then.
*/
}
return extra_offset;
}