From f66f81546d440399d2cf2bdd6a4ffa800afe437d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 15 Apr 2025 22:34:42 -0600 Subject: [PATCH] fix several warnings from PBD::Signal due to a missing return call for some types --- libs/pbd/pbd/signals.h | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/libs/pbd/pbd/signals.h b/libs/pbd/pbd/signals.h index cf7d3bfe78..286c3d5cf1 100644 --- a/libs/pbd/pbd/signals.h +++ b/libs/pbd/pbd/signals.h @@ -463,15 +463,24 @@ SignalWithCombiner::operator() (A... a) (i->second)(a...); } } + +#ifdef DEBUG_PBD_SIGNAL_EMISSION + if (_debug_emission) { + std::cerr << "------ Signal @ " << this << " emission process ends\n"; + } +#endif + return; + } else { + std::list r; for (typename Slots::const_iterator i = s.begin(); i != s.end(); ++i) { /* We may have just called a slot, and this may have resulted in - * disconnection of other slots from us. The list copy means that - * this won't cause any problems with invalidated iterators, but we - * must check to see if the slot we are about to call is still on the list. - */ + * disconnection of other slots from us. The list copy means that + * this won't cause any problems with invalidated iterators, but we + * must check to see if the slot we are about to call is still on the list. + */ bool still_there = false; { Glib::Threads::Mutex::Lock lm (_mutex); @@ -486,17 +495,17 @@ SignalWithCombiner::operator() (A... a) #endif r.push_back ((i->second)(a...)); } - } +#ifdef DEBUG_PBD_SIGNAL_EMISSION + if (_debug_emission) { + std::cerr << "------ Signal @ " << this << " emission process ends\n"; + } +#endif + } /* Call our combiner to do whatever is required to the result values */ Combiner c; return c (r.begin(), r.end()); } -#ifdef DEBUG_PBD_SIGNAL_EMISSION - if (_debug_emission) { - std::cerr << "------ Signal @ " << this << " emission process ends\n"; - } -#endif } template @@ -543,4 +552,3 @@ SignalWithCombiner::disconnect (std::shared_ptr c } } /* namespace */ -