diff options
author | Robin Gareus <robin@gareus.org> | 2020-01-27 03:31:49 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-01-27 03:31:49 +0100 |
commit | fc7dd5115def88d0dd74cc038517680f050a4ded (patch) | |
tree | 48b2eb998939605fe64a6cc96acece8f3f8b3b73 /libs/ardour/tempo.cc | |
parent | cf4d7387d2afe092bb110e1b14415fa07448ee55 (diff) |
Fix some clang-scan warnings
Diffstat (limited to 'libs/ardour/tempo.cc')
-rw-r--r-- | libs/ardour/tempo.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index 77f7265717..68081d6707 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -3407,11 +3407,12 @@ TempoMap::gui_stretch_tempo (TempoSection* ts, const samplepos_t sample, const s if (ts_copy->clamped()) { TempoSection* next_t = next_tempo_section_locked (future_map, ts_copy); TempoSection* prev_to_ts_copy = previous_tempo_section_locked (future_map, ts_copy); + assert (prev_to_ts_copy); /* the change in samples is the result of changing the slope of at most 2 previous tempo sections. * constant to constant is straightforward, as the tempo prev to ts_copy has constant slope. */ double contribution = 0.0; - if (next_t && prev_to_ts_copy && prev_to_ts_copy->type() == TempoSection::Ramp) { + if (next_t && prev_to_ts_copy->type() == TempoSection::Ramp) { contribution = (ts_copy->pulse() - prev_to_ts_copy->pulse()) / (double) (next_t->pulse() - prev_to_ts_copy->pulse()); } samplepos_t const fr_off = end_sample - sample; |