From d69a2c3c139ffc15ca3f660606ded396532ffe84 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 21 Oct 2022 07:51:53 -0600 Subject: [PATCH] small change to Locations::clear_cue_markers() API to bring it into line with other clear_* methods --- libs/ardour/ardour/location.h | 2 +- libs/ardour/location.cc | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libs/ardour/ardour/location.h b/libs/ardour/ardour/location.h index 64dc1fcc67..79f70a2a13 100644 --- a/libs/ardour/ardour/location.h +++ b/libs/ardour/ardour/location.h @@ -252,7 +252,7 @@ public: bool clear_xrun_markers (); bool clear_ranges (); - void clear_cue_markers (samplepos_t start, samplepos_t end); + bool clear_cue_markers (samplepos_t start, samplepos_t end); void ripple (timepos_t const & at, timecnt_t const & distance, bool include_locked, bool notify); diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc index 4576444c7c..88acf9824f 100644 --- a/libs/ardour/location.cc +++ b/libs/ardour/location.cc @@ -1663,7 +1663,7 @@ Locations::ripple (timepos_t const & at, timecnt_t const & distance, bool includ } } -void +bool Locations::clear_cue_markers (samplepos_t start, samplepos_t end) { TempoMap::SharedPtr tmap (TempoMap::use()); @@ -1671,7 +1671,7 @@ Locations::clear_cue_markers (samplepos_t start, samplepos_t end) Temporal::Beats eb; bool have_beats = false; vector r; - + bool removed_at_least_one = false; { Glib::Threads::RWLock::WriterLock lm (_lock); @@ -1702,6 +1702,7 @@ Locations::clear_cue_markers (samplepos_t start, samplepos_t end) continue; } } + removed_at_least_one = true; } ++i; @@ -1712,4 +1713,6 @@ Locations::clear_cue_markers (samplepos_t start, samplepos_t end) removed (l); /* EMIT SIGNAL */ delete l; } + + return removed_at_least_one; }