From eb1468718af169f61c1eaa0a9ab97e28c9a4d8b7 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 19 Apr 2021 15:42:16 -0600 Subject: [PATCH] fix ambiguity in TransportFSM Event constructors --- libs/ardour/ardour/transport_fsm.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libs/ardour/ardour/transport_fsm.h b/libs/ardour/ardour/transport_fsm.h index 44821ead90..ce35c32be9 100644 --- a/libs/ardour/ardour/transport_fsm.h +++ b/libs/ardour/ardour/transport_fsm.h @@ -95,14 +95,16 @@ struct TransportFSM { assert (t == Locate); } - Event (EventType t, double sp, bool ab, bool cs, bool ad) - : type (t) - , abort_capture (ab) - , clear_state (cs) + /* here we drop the event type as the first argument in order + disambiguate from the StopTransport case above (compiler can + cast double-to-bool and complains. C++11 would allow "= + delete" as an alternate fix, but this is fine. + */ + Event (double sp, bool ad) + : type (SetSpeed) , speed (sp) , as_default (ad) { - assert (t == SetSpeed); } void* operator new (size_t);