From 4da9441691217e6c3966a7b73a2b7f06946438ea Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 10 Oct 2020 00:18:41 +0200 Subject: [PATCH] Fix clang/C++11 builds, add missing override --- libs/ardour/ardour/vst3_host.h | 20 ++++++++++---------- libs/ardour/ardour/vst3_plugin.h | 18 +++++++++--------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/libs/ardour/ardour/vst3_host.h b/libs/ardour/ardour/vst3_host.h index af8e18b75b..8703e39a1a 100644 --- a/libs/ardour/ardour/vst3_host.h +++ b/libs/ardour/ardour/vst3_host.h @@ -31,13 +31,13 @@ #include "ardour/libardour_visibility.h" #include "vst3/vst3.h" -#define QUERY_INTERFACE_IMPL(Interface) \ -tresult PLUGIN_API queryInterface (const TUID _iid, void** obj) \ -{ \ - QUERY_INTERFACE (_iid, obj, FUnknown::iid, Interface) \ - QUERY_INTERFACE (_iid, obj, Interface::iid, Interface) \ - *obj = nullptr; \ - return kNoInterface; \ +#define QUERY_INTERFACE_IMPL(Interface) \ +tresult PLUGIN_API queryInterface (const TUID _iid, void** obj) SMTG_OVERRIDE \ +{ \ + QUERY_INTERFACE (_iid, obj, FUnknown::iid, Interface) \ + QUERY_INTERFACE (_iid, obj, Interface::iid, Interface) \ + *obj = nullptr; \ + return kNoInterface; \ } #if defined(__clang__) @@ -317,11 +317,11 @@ public: uint32 PLUGIN_API addRef () SMTG_OVERRIDE { return 1; } uint32 PLUGIN_API release () SMTG_OVERRIDE { return 1; } - int32 PLUGIN_API PLUGIN_API getEventCount() { + int32 PLUGIN_API PLUGIN_API getEventCount() SMTG_OVERRIDE { return _events.size (); } - tresult PLUGIN_API getEvent (int32 index, Vst::Event& e) { + tresult PLUGIN_API getEvent (int32 index, Vst::Event& e) SMTG_OVERRIDE { if (index >= 0 && index < (int32)_events.size ()) { e = _events[index]; return kResultTrue; @@ -330,7 +330,7 @@ public: } } - tresult PLUGIN_API addEvent (Vst::Event& e) { + tresult PLUGIN_API addEvent (Vst::Event& e) SMTG_OVERRIDE { _events.push_back (e); return kResultTrue; } diff --git a/libs/ardour/ardour/vst3_plugin.h b/libs/ardour/ardour/vst3_plugin.h index 0110c84781..c54db2e853 100644 --- a/libs/ardour/ardour/vst3_plugin.h +++ b/libs/ardour/ardour/vst3_plugin.h @@ -88,14 +88,14 @@ public: tresult PLUGIN_API notifyProgramListChange (Vst::ProgramListID, int32) SMTG_OVERRIDE; /* IContextInfoProvider3 API */ - tresult PLUGIN_API getContextInfoValue (int32&, FIDString); - tresult PLUGIN_API getContextInfoString (Vst::TChar*, int32, FIDString); - tresult PLUGIN_API getContextInfoValue (double&, FIDString); - tresult PLUGIN_API setContextInfoValue (FIDString, double); - tresult PLUGIN_API setContextInfoValue (FIDString, int32); - tresult PLUGIN_API setContextInfoString (FIDString, Vst::TChar*); - tresult PLUGIN_API beginEditContextInfoValue (FIDString); - tresult PLUGIN_API endEditContextInfoValue (FIDString); + tresult PLUGIN_API getContextInfoValue (int32&, FIDString) SMTG_OVERRIDE; + tresult PLUGIN_API getContextInfoString (Vst::TChar*, int32, FIDString) SMTG_OVERRIDE; + tresult PLUGIN_API getContextInfoValue (double&, FIDString) SMTG_OVERRIDE; + tresult PLUGIN_API setContextInfoValue (FIDString, double) SMTG_OVERRIDE; + tresult PLUGIN_API setContextInfoValue (FIDString, int32) SMTG_OVERRIDE; + tresult PLUGIN_API setContextInfoString (FIDString, Vst::TChar*) SMTG_OVERRIDE; + tresult PLUGIN_API beginEditContextInfoValue (FIDString) SMTG_OVERRIDE; + tresult PLUGIN_API endEditContextInfoValue (FIDString) SMTG_OVERRIDE; /* GUI */ bool has_editor () const; @@ -107,7 +107,7 @@ public: #endif void update_contoller_param (); - tresult PLUGIN_API queryInterface (const TUID _iid, void** obj); + tresult PLUGIN_API queryInterface (const TUID _iid, void** obj) SMTG_OVERRIDE; uint32 PLUGIN_API addRef () SMTG_OVERRIDE { return 1; } uint32 PLUGIN_API release () SMTG_OVERRIDE { return 1; }