diff --git a/src/common/communication/common.h b/src/common/communication/common.h index 4c455e57..3021f773 100644 --- a/src/common/communication/common.h +++ b/src/common/communication/common.h @@ -217,7 +217,7 @@ class Sockets { * * @note Classes overriding this should call `close()` in their destructor. */ - virtual ~Sockets() { + virtual ~Sockets() noexcept { try { // NOTE: Because someone has wiped their home directory in the past // by manually modifying the socket base directory argument @@ -239,6 +239,9 @@ class Sockets { // There should not be any filesystem errors since only one side // removes the files, but if we somehow can't delete the file // then we can just silently ignore this + } catch (const std::bad_alloc&) { + // If we cannot clean up because we're out of memory, then that's + // fine } } diff --git a/src/common/communication/vst2.cpp b/src/common/communication/vst2.cpp index 18b22ce7..c544636c 100644 --- a/src/common/communication/vst2.cpp +++ b/src/common/communication/vst2.cpp @@ -16,6 +16,8 @@ #include "vst2.h" +DefaultDataConverter::~DefaultDataConverter() noexcept {} + EventPayload DefaultDataConverter::read(const int /*opcode*/, const int /*index*/, const intptr_t /*value*/, diff --git a/src/common/communication/vst2.h b/src/common/communication/vst2.h index 25d2f9bd..628f37f9 100644 --- a/src/common/communication/vst2.h +++ b/src/common/communication/vst2.h @@ -30,7 +30,7 @@ */ class DefaultDataConverter { public: - virtual ~DefaultDataConverter(){}; + virtual ~DefaultDataConverter() noexcept; /** * Read data from the `data` void pointer into a an `EventPayload` value @@ -315,7 +315,7 @@ class Vst2Sockets : public Sockets { (base_dir / "host_vst_control.sock").string(), listen) {} - ~Vst2Sockets() { close(); } + ~Vst2Sockets() noexcept override { close(); } void connect() override { host_vst_dispatch.connect(); diff --git a/src/common/communication/vst3.h b/src/common/communication/vst3.h index 20107f62..61fda61d 100644 --- a/src/common/communication/vst3.h +++ b/src/common/communication/vst3.h @@ -326,7 +326,7 @@ class Vst3Sockets : public Sockets { io_context(io_context) {} // NOLINTNEXTLINE(clang-analyzer-optin.cplusplus.VirtualCall) - ~Vst3Sockets() { close(); } + ~Vst3Sockets() noexcept override { close(); } void connect() override { host_vst_control.connect(); diff --git a/src/common/configuration.cpp b/src/common/configuration.cpp index 8fad4d66..adb0074b 100644 --- a/src/common/configuration.cpp +++ b/src/common/configuration.cpp @@ -26,7 +26,7 @@ namespace fs = boost::filesystem; -Configuration::Configuration() {} +Configuration::Configuration() noexcept {} Configuration::Configuration(const fs::path& config_path, const fs::path& yabridge_path) @@ -140,7 +140,8 @@ Configuration::Configuration(const fs::path& config_path, } } -std::chrono::steady_clock::duration Configuration::event_loop_interval() const { +std::chrono::steady_clock::duration Configuration::event_loop_interval() + const noexcept { return std::chrono::duration_cast( std::chrono::milliseconds(1000) / frame_rate.value_or(60.0)); } diff --git a/src/common/configuration.h b/src/common/configuration.h index 0f58818c..92607dfd 100644 --- a/src/common/configuration.h +++ b/src/common/configuration.h @@ -59,7 +59,7 @@ class Configuration { /** * Create an empty configuration object with default settings. */ - Configuration(); + Configuration() noexcept; /** * Load the configuration for an instance of yabridge from a configuration @@ -180,7 +180,7 @@ class Configuration { * The delay in milliseconds between calls to the event loop and to * `effEditIdle` for VST2 plugins. This is based on `frame_rate`. */ - std::chrono::steady_clock::duration event_loop_interval() const; + std::chrono::steady_clock::duration event_loop_interval() const noexcept; template void serialize(S& s) { diff --git a/src/common/logging/vst2.cpp b/src/common/logging/vst2.cpp index 1b0c1c50..81634ac7 100644 --- a/src/common/logging/vst2.cpp +++ b/src/common/logging/vst2.cpp @@ -525,7 +525,8 @@ void Vst2Logger::log_event_response( } } -bool Vst2Logger::should_filter_event(bool is_dispatch, int opcode) const { +bool Vst2Logger::should_filter_event(bool is_dispatch, + int opcode) const noexcept { if (logger.verbosity >= Logger::Verbosity::all_events) { return false; } diff --git a/src/common/logging/vst2.h b/src/common/logging/vst2.h index ede2696e..e88e912b 100644 --- a/src/common/logging/vst2.h +++ b/src/common/logging/vst2.h @@ -87,5 +87,5 @@ class Vst2Logger { * Determine whether an event should be filtered based on the current * verbosity level. */ - bool should_filter_event(bool is_dispatch, int opcode) const; + bool should_filter_event(bool is_dispatch, int opcode) const noexcept; }; diff --git a/src/common/plugins.cpp b/src/common/plugins.cpp index abca7b49..e898bae7 100644 --- a/src/common/plugins.cpp +++ b/src/common/plugins.cpp @@ -52,7 +52,7 @@ LibArchitecture find_dll_architecture(const fs::path& plugin_path) { throw std::runtime_error(error_msg.str()); } -PluginType plugin_type_from_string(const std::string& plugin_type) { +PluginType plugin_type_from_string(const std::string& plugin_type) noexcept { if (plugin_type == "VST2") { return PluginType::vst2; } else if (plugin_type == "VST3") { diff --git a/src/common/plugins.h b/src/common/plugins.h index c0dcc0d3..62e7aca5 100644 --- a/src/common/plugins.h +++ b/src/common/plugins.h @@ -60,5 +60,5 @@ void serialize(S& s, PluginType& plugin_type) { */ LibArchitecture find_dll_architecture(const boost::filesystem::path&); -PluginType plugin_type_from_string(const std::string& plugin_type); +PluginType plugin_type_from_string(const std::string& plugin_type) noexcept; std::string plugin_type_to_string(const PluginType& plugin_type); diff --git a/src/common/serialization/common.h b/src/common/serialization/common.h index 3b868f33..928a5a64 100644 --- a/src/common/serialization/common.h +++ b/src/common/serialization/common.h @@ -113,12 +113,12 @@ class MessageReference { * `0x1337420` so it's at least obvious where it's coming from if we get a * segfault caused by a read to that address. */ - MessageReference() : object(reinterpret_cast(0x1337420)) {} + MessageReference() noexcept : object(reinterpret_cast(0x1337420)) {} /** * Store a reference in this object. */ - MessageReference(T& object) : object(&object) {} + MessageReference(T& object) noexcept : object(&object) {} using Response = typename T::Response; diff --git a/src/common/serialization/vst2.cpp b/src/common/serialization/vst2.cpp index 9323fa68..a17c0e77 100644 --- a/src/common/serialization/vst2.cpp +++ b/src/common/serialization/vst2.cpp @@ -16,6 +16,26 @@ #include "vst2.h" +AEffect& update_aeffect(AEffect& plugin, + const AEffect& updated_plugin) noexcept { + plugin.magic = updated_plugin.magic; + plugin.numPrograms = updated_plugin.numPrograms; + plugin.numParams = updated_plugin.numParams; + plugin.numInputs = updated_plugin.numInputs; + plugin.numOutputs = updated_plugin.numOutputs; + plugin.flags = updated_plugin.flags; + plugin.initialDelay = updated_plugin.initialDelay; + plugin.empty3a = updated_plugin.empty3a; + plugin.empty3b = updated_plugin.empty3b; + plugin.unkown_float = updated_plugin.unkown_float; + plugin.uniqueID = updated_plugin.uniqueID; + plugin.version = updated_plugin.version; + + return plugin; +} + +DynamicVstEvents::DynamicVstEvents() noexcept {} + DynamicVstEvents::DynamicVstEvents(const VstEvents& c_events) : events(c_events.numEvents) { // Copy from the C-style array into a vector for serialization @@ -52,6 +72,8 @@ VstEvents& DynamicVstEvents::as_c_events() { return *vst_events; } +DynamicSpeakerArrangement::DynamicSpeakerArrangement() noexcept {} + DynamicSpeakerArrangement::DynamicSpeakerArrangement( const VstSpeakerArrangement& speaker_arrangement) : flags(speaker_arrangement.flags), @@ -90,20 +112,3 @@ std::vector& DynamicSpeakerArrangement::as_raw_data() { return speaker_arrangement_buffer; } - -AEffect& update_aeffect(AEffect& plugin, const AEffect& updated_plugin) { - plugin.magic = updated_plugin.magic; - plugin.numPrograms = updated_plugin.numPrograms; - plugin.numParams = updated_plugin.numParams; - plugin.numInputs = updated_plugin.numInputs; - plugin.numOutputs = updated_plugin.numOutputs; - plugin.flags = updated_plugin.flags; - plugin.initialDelay = updated_plugin.initialDelay; - plugin.empty3a = updated_plugin.empty3a; - plugin.empty3b = updated_plugin.empty3b; - plugin.unkown_float = updated_plugin.unkown_float; - plugin.uniqueID = updated_plugin.uniqueID; - plugin.version = updated_plugin.version; - - return plugin; -} diff --git a/src/common/serialization/vst2.h b/src/common/serialization/vst2.h index 4cbbad80..4b8d02c3 100644 --- a/src/common/serialization/vst2.h +++ b/src/common/serialization/vst2.h @@ -65,7 +65,8 @@ constexpr size_t binary_buffer_size = 50 << 20; * untouched. This should be updating the same values as the serialization * function right below this. */ -AEffect& update_aeffect(AEffect& plugin, const AEffect& updated_plugin); +AEffect& update_aeffect(AEffect& plugin, + const AEffect& updated_plugin) noexcept; /** * The serialization function for `AEffect` structs. This will s serialize all @@ -164,7 +165,7 @@ struct ChunkData { */ class alignas(16) DynamicVstEvents { public: - DynamicVstEvents(){}; + DynamicVstEvents() noexcept; explicit DynamicVstEvents(const VstEvents& c_events); @@ -216,7 +217,7 @@ class alignas(16) DynamicVstEvents { */ class alignas(16) DynamicSpeakerArrangement { public: - DynamicSpeakerArrangement(){}; + DynamicSpeakerArrangement() noexcept; explicit DynamicSpeakerArrangement( const VstSpeakerArrangement& speaker_arrangement); diff --git a/src/common/serialization/vst3.h b/src/common/serialization/vst3.h index 0e2e5148..94d726d3 100644 --- a/src/common/serialization/vst3.h +++ b/src/common/serialization/vst3.h @@ -278,7 +278,8 @@ void serialize(S& s, CallbackRequest& payload) { * variant. */ template -std::variant& get_request_variant(std::variant& request) { +std::variant& get_request_variant( + std::variant& request) noexcept { return request; } @@ -290,6 +291,6 @@ std::variant& get_request_variant(std::variant& request) { * @overload */ inline AudioProcessorRequest::Payload& get_request_variant( - AudioProcessorRequest& request) { + AudioProcessorRequest& request) noexcept { return request.payload; } diff --git a/src/common/serialization/vst3/attribute-list.cpp b/src/common/serialization/vst3/attribute-list.cpp index 1fbd0489..e5ddc644 100644 --- a/src/common/serialization/vst3/attribute-list.cpp +++ b/src/common/serialization/vst3/attribute-list.cpp @@ -76,9 +76,9 @@ const static char* stream_meta_data_string_keys[] = { Steinberg::Vst::PresetAttributes::kName, Steinberg::Vst::PresetAttributes::kFileName}; -YaAttributeList::YaAttributeList(){FUNKNOWN_CTOR} +YaAttributeList::YaAttributeList() noexcept {FUNKNOWN_CTOR} -YaAttributeList::~YaAttributeList() { +YaAttributeList::~YaAttributeList() noexcept { FUNKNOWN_DTOR } diff --git a/src/common/serialization/vst3/attribute-list.h b/src/common/serialization/vst3/attribute-list.h index 109a6a97..04d40350 100644 --- a/src/common/serialization/vst3/attribute-list.h +++ b/src/common/serialization/vst3/attribute-list.h @@ -36,9 +36,9 @@ class YaAttributeList : public Steinberg::Vst::IAttributeList { * Default constructor with an empty attributeList. The plugin can use this * to write a attributeList. */ - YaAttributeList(); + YaAttributeList() noexcept; - ~YaAttributeList(); + ~YaAttributeList() noexcept; DECLARE_FUNKNOWN_METHODS diff --git a/src/common/serialization/vst3/base.cpp b/src/common/serialization/vst3/base.cpp index c4df38ce..8d611eb4 100644 --- a/src/common/serialization/vst3/base.cpp +++ b/src/common/serialization/vst3/base.cpp @@ -57,7 +57,7 @@ std::u16string tchar_pointer_to_u16string(const Steinberg::Vst::TChar* string, } const Steinberg::Vst::TChar* u16string_to_tchar_pointer( - const std::u16string& string) { + const std::u16string& string) noexcept { #ifdef __WINE__ static_assert(sizeof(Steinberg::Vst::TChar) == sizeof(char16_t)); return reinterpret_cast(string.c_str()); @@ -66,10 +66,11 @@ const Steinberg::Vst::TChar* u16string_to_tchar_pointer( #endif } -WineUID::WineUID() {} -WineUID::WineUID(const Steinberg::TUID& tuid) : uid(std::to_array(tuid)) {} +WineUID::WineUID() noexcept {} +WineUID::WineUID(const Steinberg::TUID& tuid) noexcept + : uid(std::to_array(tuid)) {} -ArrayUID WineUID::get_native_uid() const { +ArrayUID WineUID::get_native_uid() const noexcept { // We need to shuffle the first 8 bytes around to convert between the // COM-compatible and non COM-compatible formats described by the // `INLINE_UID` macro. See that macro as a reference for the transformations @@ -89,10 +90,11 @@ ArrayUID WineUID::get_native_uid() const { return converted_uid; } -NativeUID::NativeUID() {} -NativeUID::NativeUID(const Steinberg::TUID& tuid) : uid(std::to_array(tuid)) {} +NativeUID::NativeUID() noexcept {} +NativeUID::NativeUID(const Steinberg::TUID& tuid) noexcept + : uid(std::to_array(tuid)) {} -ArrayUID NativeUID::get_wine_uid() const { +ArrayUID NativeUID::get_wine_uid() const noexcept { // This transformation is actually the same as the one in // `WineUID::get_native_uid()`, but we'll spell it out here in full for // understandability's sake. @@ -111,12 +113,13 @@ ArrayUID NativeUID::get_wine_uid() const { return converted_uid; } -UniversalTResult::UniversalTResult() : universal_result(Value::kResultFalse) {} +UniversalTResult::UniversalTResult() noexcept + : universal_result(Value::kResultFalse) {} -UniversalTResult::UniversalTResult(tresult native_result) +UniversalTResult::UniversalTResult(tresult native_result) noexcept : universal_result(to_universal_result(native_result)) {} -UniversalTResult::operator tresult() const { +UniversalTResult::operator tresult() const noexcept { static_assert(Steinberg::kResultOk == Steinberg::kResultTrue); switch (universal_result) { case Value::kNoInterface: @@ -184,7 +187,7 @@ std::string UniversalTResult::string() const { } UniversalTResult::Value UniversalTResult::to_universal_result( - tresult native_result) { + tresult native_result) noexcept { static_assert(Steinberg::kResultOk == Steinberg::kResultTrue); switch (native_result) { case Steinberg::kNoInterface: diff --git a/src/common/serialization/vst3/base.h b/src/common/serialization/vst3/base.h index 23e2620b..33176231 100644 --- a/src/common/serialization/vst3/base.h +++ b/src/common/serialization/vst3/base.h @@ -67,7 +67,7 @@ std::u16string tchar_pointer_to_u16string(const Steinberg::Vst::TChar* string, * Convert an `std::u16string` back to a null terminated `TChar*` string. */ const Steinberg::Vst::TChar* u16string_to_tchar_pointer( - const std::u16string& string); + const std::u16string& string) noexcept; /** * Empty struct for when we have send a response to some operation without any @@ -100,10 +100,10 @@ using ArrayUID = std::array< */ class WineUID { public: - WineUID(); - WineUID(const Steinberg::TUID& tuid); + WineUID() noexcept; + WineUID(const Steinberg::TUID& tuid) noexcept; - ArrayUID get_native_uid() const; + ArrayUID get_native_uid() const noexcept; template void serialize(S& s) { @@ -129,18 +129,18 @@ class WineUID { */ class NativeUID { public: - NativeUID(); - NativeUID(const Steinberg::TUID& tuid); + NativeUID() noexcept; + NativeUID(const Steinberg::TUID& tuid) noexcept; /** * Convert to the garbled byte order used in the Wine plugin host. */ - ArrayUID get_wine_uid() const; + ArrayUID get_wine_uid() const noexcept; /** * Get a reference to the proper native UID. */ - inline const ArrayUID& native_uid() const { return uid; }; + inline const ArrayUID& native_uid() const noexcept { return uid; }; template void serialize(S& s) { @@ -159,10 +159,10 @@ class NativeUID { template class PrimitiveWrapper { public: - PrimitiveWrapper() {} - PrimitiveWrapper(T value) : value(value) {} + PrimitiveWrapper() noexcept {} + PrimitiveWrapper(T value) noexcept : value(value) {} - operator T() const { return value; } + operator T() const noexcept { return value; } template void serialize(S& s) { @@ -185,17 +185,17 @@ class UniversalTResult { * The default constructor will initialize the value to `kResutlFalse` and * should only ever be used by bitsery in the serialization process. */ - UniversalTResult(); + UniversalTResult() noexcept; /** * Convert a native tresult into a univeral one. */ - UniversalTResult(tresult native_result); + UniversalTResult(tresult native_result) noexcept; /** * Get the native equivalent for the wrapped `tresult` value. */ - operator tresult() const; + operator tresult() const noexcept; /** * Get the original name for the result, e.g. `kResultOk`. @@ -225,7 +225,7 @@ class UniversalTResult { kOutOfMemory }; - static Value to_universal_result(tresult native_result); + static Value to_universal_result(tresult native_result) noexcept; Value universal_result; }; diff --git a/src/common/serialization/vst3/bstream.cpp b/src/common/serialization/vst3/bstream.cpp index 293600f7..a79cb87e 100644 --- a/src/common/serialization/vst3/bstream.cpp +++ b/src/common/serialization/vst3/bstream.cpp @@ -19,7 +19,7 @@ #include #include -YaBStream::YaBStream(){FUNKNOWN_CTOR} +YaBStream::YaBStream() noexcept {FUNKNOWN_CTOR} YaBStream::YaBStream(Steinberg::IBStream* stream) { FUNKNOWN_CTOR @@ -80,7 +80,7 @@ YaBStream::YaBStream(Steinberg::IBStream* stream) { } } -YaBStream::~YaBStream() { +YaBStream::~YaBStream() noexcept { FUNKNOWN_DTOR } @@ -138,7 +138,7 @@ tresult YaBStream::write_back(Steinberg::IBStream* stream) const { return Steinberg::kResultOk; } -size_t YaBStream::size() const { +size_t YaBStream::size() const noexcept { return buffer.size(); } diff --git a/src/common/serialization/vst3/bstream.h b/src/common/serialization/vst3/bstream.h index d751c977..fb18c374 100644 --- a/src/common/serialization/vst3/bstream.h +++ b/src/common/serialization/vst3/bstream.h @@ -44,7 +44,7 @@ class YaBStream : public Steinberg::IBStream, * other constructor will check whether the `IBstream*` provided by the host * supports stream attributes and configures the object accordingly. */ - YaBStream(); + YaBStream() noexcept; /** * Read an existing stream. @@ -53,7 +53,7 @@ class YaBStream : public Steinberg::IBStream, */ YaBStream(Steinberg::IBStream* stream); - virtual ~YaBStream(); + virtual ~YaBStream() noexcept; DECLARE_FUNKNOWN_METHODS @@ -66,7 +66,7 @@ class YaBStream : public Steinberg::IBStream, /** * Return the buffer's, used in the logging messages. */ - size_t size() const; + size_t size() const noexcept; // From `IBstream` tresult PLUGIN_API read(void* buffer, diff --git a/src/common/serialization/vst3/component-handler-proxy.cpp b/src/common/serialization/vst3/component-handler-proxy.cpp index efb7d55a..0d13c979 100644 --- a/src/common/serialization/vst3/component-handler-proxy.cpp +++ b/src/common/serialization/vst3/component-handler-proxy.cpp @@ -16,11 +16,11 @@ #include "component-handler-proxy.h" -Vst3ComponentHandlerProxy::ConstructArgs::ConstructArgs() {} +Vst3ComponentHandlerProxy::ConstructArgs::ConstructArgs() noexcept {} Vst3ComponentHandlerProxy::ConstructArgs::ConstructArgs( Steinberg::IPtr object, - size_t owner_instance_id) + size_t owner_instance_id) noexcept : owner_instance_id(owner_instance_id), component_handler_args(object), component_handler_2_args(object), @@ -30,7 +30,8 @@ Vst3ComponentHandlerProxy::ConstructArgs::ConstructArgs( unit_handler_args(object), unit_handler_2_args(object) {} -Vst3ComponentHandlerProxy::Vst3ComponentHandlerProxy(const ConstructArgs&& args) +Vst3ComponentHandlerProxy::Vst3ComponentHandlerProxy( + const ConstructArgs&& args) noexcept : YaComponentHandler(std::move(args.component_handler_args)), YaComponentHandler2(std::move(args.component_handler_2_args)), YaComponentHandler3(std::move(args.component_handler_3_args)), @@ -41,7 +42,7 @@ Vst3ComponentHandlerProxy::Vst3ComponentHandlerProxy(const ConstructArgs&& args) YaUnitHandler2(std::move(args.unit_handler_2_args)), arguments(std::move(args)){FUNKNOWN_CTOR} - Vst3ComponentHandlerProxy::~Vst3ComponentHandlerProxy() { + Vst3ComponentHandlerProxy::~Vst3ComponentHandlerProxy() noexcept { FUNKNOWN_DTOR } diff --git a/src/common/serialization/vst3/component-handler-proxy.h b/src/common/serialization/vst3/component-handler-proxy.h index bce4ee81..e19c816d 100644 --- a/src/common/serialization/vst3/component-handler-proxy.h +++ b/src/common/serialization/vst3/component-handler-proxy.h @@ -49,14 +49,14 @@ class Vst3ComponentHandlerProxy : public YaComponentHandler, * `Vst3ComponentHandlerProxyImpl`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Read from an existing object. We will try to mimic this object, so * we'll support any interfaces this object also supports. */ ConstructArgs(Steinberg::IPtr object, - size_t owner_instance_id); + size_t owner_instance_id) noexcept; /** * The unique instance identifier of the proxy object instance this @@ -98,7 +98,7 @@ class Vst3ComponentHandlerProxy : public YaComponentHandler, * that of the objects they are passed to. If those objects get dropped, * then the host contexts should also be dropped. */ - Vst3ComponentHandlerProxy(const ConstructArgs&& args); + Vst3ComponentHandlerProxy(const ConstructArgs&& args) noexcept; /** * The lifetime of this object should be bound to the object we created it @@ -106,14 +106,14 @@ class Vst3ComponentHandlerProxy : public YaComponentHandler, * dropped a corresponding `Vst3ComponentHandlerProxyImpl` should also be * dropped. */ - virtual ~Vst3ComponentHandlerProxy(); + virtual ~Vst3ComponentHandlerProxy() noexcept; DECLARE_FUNKNOWN_METHODS /** * Get the instance ID of the owner of this object. */ - inline size_t owner_instance_id() const { + inline size_t owner_instance_id() const noexcept { return arguments.owner_instance_id; } diff --git a/src/common/serialization/vst3/component-handler/component-handler-2.cpp b/src/common/serialization/vst3/component-handler/component-handler-2.cpp index 62d2c4ed..dc904b72 100644 --- a/src/common/serialization/vst3/component-handler/component-handler-2.cpp +++ b/src/common/serialization/vst3/component-handler/component-handler-2.cpp @@ -16,12 +16,12 @@ #include "component-handler-2.h" -YaComponentHandler2::ConstructArgs::ConstructArgs() {} +YaComponentHandler2::ConstructArgs::ConstructArgs() noexcept {} YaComponentHandler2::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported( Steinberg::FUnknownPtr(object)) {} -YaComponentHandler2::YaComponentHandler2(const ConstructArgs&& args) +YaComponentHandler2::YaComponentHandler2(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/component-handler/component-handler-2.h b/src/common/serialization/vst3/component-handler/component-handler-2.h index 0fa096ed..712e8c96 100644 --- a/src/common/serialization/vst3/component-handler/component-handler-2.h +++ b/src/common/serialization/vst3/component-handler/component-handler-2.h @@ -34,13 +34,13 @@ class YaComponentHandler2 : public Steinberg::Vst::IComponentHandler2 { * These are the arguments for creating a `YaComponentHandler2`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `IComponentHandler2` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -57,9 +57,9 @@ class YaComponentHandler2 : public Steinberg::Vst::IComponentHandler2 { * Instantiate this instance with arguments read from another interface * implementation. */ - YaComponentHandler2(const ConstructArgs&& args); + YaComponentHandler2(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to `IComponentHandler2::setDirty(state)` diff --git a/src/common/serialization/vst3/component-handler/component-handler-3.cpp b/src/common/serialization/vst3/component-handler/component-handler-3.cpp index 4700bc63..fe4a527a 100644 --- a/src/common/serialization/vst3/component-handler/component-handler-3.cpp +++ b/src/common/serialization/vst3/component-handler/component-handler-3.cpp @@ -16,12 +16,12 @@ #include "component-handler-3.h" -YaComponentHandler3::ConstructArgs::ConstructArgs() {} +YaComponentHandler3::ConstructArgs::ConstructArgs() noexcept {} YaComponentHandler3::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported( Steinberg::FUnknownPtr(object)) {} -YaComponentHandler3::YaComponentHandler3(const ConstructArgs&& args) +YaComponentHandler3::YaComponentHandler3(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/component-handler/component-handler-3.h b/src/common/serialization/vst3/component-handler/component-handler-3.h index f9301736..70b42a82 100644 --- a/src/common/serialization/vst3/component-handler/component-handler-3.h +++ b/src/common/serialization/vst3/component-handler/component-handler-3.h @@ -36,13 +36,13 @@ class YaComponentHandler3 : public Steinberg::Vst::IComponentHandler3 { * These are the arguments for creating a `YaComponentHandler3`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `IComponentHandler3` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -59,9 +59,9 @@ class YaComponentHandler3 : public Steinberg::Vst::IComponentHandler3 { * Instantiate this instance with arguments read from another interface * implementation. */ - YaComponentHandler3(const ConstructArgs&& args); + YaComponentHandler3(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * The arguments needed to create a proxy object for the context menu diff --git a/src/common/serialization/vst3/component-handler/component-handler-bus-activation.cpp b/src/common/serialization/vst3/component-handler/component-handler-bus-activation.cpp index ac6f3480..4217aefb 100644 --- a/src/common/serialization/vst3/component-handler/component-handler-bus-activation.cpp +++ b/src/common/serialization/vst3/component-handler/component-handler-bus-activation.cpp @@ -16,13 +16,13 @@ #include "component-handler-bus-activation.h" -YaComponentHandlerBusActivation::ConstructArgs::ConstructArgs() {} +YaComponentHandlerBusActivation::ConstructArgs::ConstructArgs() noexcept {} YaComponentHandlerBusActivation::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported(Steinberg::FUnknownPtr< Steinberg::Vst::IComponentHandlerBusActivation>(object)) {} YaComponentHandlerBusActivation::YaComponentHandlerBusActivation( - const ConstructArgs&& args) + const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/component-handler/component-handler-bus-activation.h b/src/common/serialization/vst3/component-handler/component-handler-bus-activation.h index 9b77a609..6963c616 100644 --- a/src/common/serialization/vst3/component-handler/component-handler-bus-activation.h +++ b/src/common/serialization/vst3/component-handler/component-handler-bus-activation.h @@ -37,13 +37,13 @@ class YaComponentHandlerBusActivation * These are the arguments for creating a `YaComponentHandlerBusActivation`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `IComponentHandlerBusActivation` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -60,9 +60,9 @@ class YaComponentHandlerBusActivation * Instantiate this instance with arguments read from another interface * implementation. */ - YaComponentHandlerBusActivation(const ConstructArgs&& args); + YaComponentHandlerBusActivation(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to diff --git a/src/common/serialization/vst3/component-handler/component-handler.cpp b/src/common/serialization/vst3/component-handler/component-handler.cpp index 9fb6d964..688e4662 100644 --- a/src/common/serialization/vst3/component-handler/component-handler.cpp +++ b/src/common/serialization/vst3/component-handler/component-handler.cpp @@ -16,12 +16,12 @@ #include "component-handler.h" -YaComponentHandler::ConstructArgs::ConstructArgs() {} +YaComponentHandler::ConstructArgs::ConstructArgs() noexcept {} YaComponentHandler::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported( Steinberg::FUnknownPtr(object)) {} -YaComponentHandler::YaComponentHandler(const ConstructArgs&& args) +YaComponentHandler::YaComponentHandler(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/component-handler/component-handler.h b/src/common/serialization/vst3/component-handler/component-handler.h index ddc24926..8dada4d9 100644 --- a/src/common/serialization/vst3/component-handler/component-handler.h +++ b/src/common/serialization/vst3/component-handler/component-handler.h @@ -34,13 +34,13 @@ class YaComponentHandler : public Steinberg::Vst::IComponentHandler { * These are the arguments for creating a `YaComponentHandler`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `IComponentHandler` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -57,9 +57,9 @@ class YaComponentHandler : public Steinberg::Vst::IComponentHandler { * Instantiate this instance with arguments read from another interface * implementation. */ - YaComponentHandler(const ConstructArgs&& args); + YaComponentHandler(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to `IComponentHandler::beginEdit(id)` to diff --git a/src/common/serialization/vst3/component-handler/progress.cpp b/src/common/serialization/vst3/component-handler/progress.cpp index d66b4c3f..1e8f7e67 100644 --- a/src/common/serialization/vst3/component-handler/progress.cpp +++ b/src/common/serialization/vst3/component-handler/progress.cpp @@ -16,11 +16,11 @@ #include "progress.h" -YaProgress::ConstructArgs::ConstructArgs() {} +YaProgress::ConstructArgs::ConstructArgs() noexcept {} YaProgress::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported(Steinberg::FUnknownPtr(object)) {} -YaProgress::YaProgress(const ConstructArgs&& args) +YaProgress::YaProgress(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/component-handler/progress.h b/src/common/serialization/vst3/component-handler/progress.h index 36d83e59..6ad4ed33 100644 --- a/src/common/serialization/vst3/component-handler/progress.h +++ b/src/common/serialization/vst3/component-handler/progress.h @@ -35,13 +35,13 @@ class YaProgress : public Steinberg::Vst::IProgress { * These are the arguments for creating a `YaProgress`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements `IProgress` * and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -58,9 +58,9 @@ class YaProgress : public Steinberg::Vst::IProgress { * Instantiate this instance with arguments read from another interface * implementation. */ - YaProgress(const ConstructArgs&& args); + YaProgress(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * The response code and returned ID for a call to `IProgress::start(type, diff --git a/src/common/serialization/vst3/component-handler/unit-handler-2.cpp b/src/common/serialization/vst3/component-handler/unit-handler-2.cpp index 2a92276e..8c9e48ff 100644 --- a/src/common/serialization/vst3/component-handler/unit-handler-2.cpp +++ b/src/common/serialization/vst3/component-handler/unit-handler-2.cpp @@ -16,12 +16,12 @@ #include "unit-handler-2.h" -YaUnitHandler2::ConstructArgs::ConstructArgs() {} +YaUnitHandler2::ConstructArgs::ConstructArgs() noexcept {} YaUnitHandler2::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported(Steinberg::FUnknownPtr(object)) { } -YaUnitHandler2::YaUnitHandler2(const ConstructArgs&& args) +YaUnitHandler2::YaUnitHandler2(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/component-handler/unit-handler-2.h b/src/common/serialization/vst3/component-handler/unit-handler-2.h index 427a32a1..5c4850ba 100644 --- a/src/common/serialization/vst3/component-handler/unit-handler-2.h +++ b/src/common/serialization/vst3/component-handler/unit-handler-2.h @@ -34,13 +34,13 @@ class YaUnitHandler2 : public Steinberg::Vst::IUnitHandler2 { * These are the arguments for creating a `YaUnitHandler2`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements `IUnitHandler2` * and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -57,9 +57,9 @@ class YaUnitHandler2 : public Steinberg::Vst::IUnitHandler2 { * Instantiate this instance with arguments read from another interface * implementation. */ - YaUnitHandler2(const ConstructArgs&& args); + YaUnitHandler2(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to diff --git a/src/common/serialization/vst3/component-handler/unit-handler.cpp b/src/common/serialization/vst3/component-handler/unit-handler.cpp index f7753fd6..363afd1f 100644 --- a/src/common/serialization/vst3/component-handler/unit-handler.cpp +++ b/src/common/serialization/vst3/component-handler/unit-handler.cpp @@ -16,11 +16,11 @@ #include "unit-handler.h" -YaUnitHandler::ConstructArgs::ConstructArgs() {} +YaUnitHandler::ConstructArgs::ConstructArgs() noexcept {} YaUnitHandler::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported(Steinberg::FUnknownPtr(object)) {} -YaUnitHandler::YaUnitHandler(const ConstructArgs&& args) +YaUnitHandler::YaUnitHandler(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/component-handler/unit-handler.h b/src/common/serialization/vst3/component-handler/unit-handler.h index 47aa3f23..c0a77328 100644 --- a/src/common/serialization/vst3/component-handler/unit-handler.h +++ b/src/common/serialization/vst3/component-handler/unit-handler.h @@ -34,13 +34,13 @@ class YaUnitHandler : public Steinberg::Vst::IUnitHandler { * These are the arguments for creating a `YaUnitHandler`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements `IUnitHandler` * and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -57,9 +57,9 @@ class YaUnitHandler : public Steinberg::Vst::IUnitHandler { * Instantiate this instance with arguments read from another interface * implementation. */ - YaUnitHandler(const ConstructArgs&& args); + YaUnitHandler(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to diff --git a/src/common/serialization/vst3/connection-point-proxy.cpp b/src/common/serialization/vst3/connection-point-proxy.cpp index 93cb8d45..30b4ec9f 100644 --- a/src/common/serialization/vst3/connection-point-proxy.cpp +++ b/src/common/serialization/vst3/connection-point-proxy.cpp @@ -16,11 +16,12 @@ #include "connection-point-proxy.h" -Vst3ConnectionPointProxy::Vst3ConnectionPointProxy(const ConstructArgs&& args) +Vst3ConnectionPointProxy::Vst3ConnectionPointProxy( + const ConstructArgs&& args) noexcept : YaConnectionPoint(std::move(args.connection_point_args)), arguments(std::move(args)){FUNKNOWN_CTOR} - Vst3ConnectionPointProxy::~Vst3ConnectionPointProxy() { + Vst3ConnectionPointProxy::~Vst3ConnectionPointProxy() noexcept { FUNKNOWN_DTOR } diff --git a/src/common/serialization/vst3/connection-point-proxy.h b/src/common/serialization/vst3/connection-point-proxy.h index f59e72c8..cf1b29b7 100644 --- a/src/common/serialization/vst3/connection-point-proxy.h +++ b/src/common/serialization/vst3/connection-point-proxy.h @@ -50,20 +50,20 @@ class Vst3ConnectionPointProxy : public YaConnectionPoint { * @note This object will be created as part of handling * `IConnectionPoint::connect()` if the connection is indirect. */ - Vst3ConnectionPointProxy(const ConstructArgs&& args); + Vst3ConnectionPointProxy(const ConstructArgs&& args) noexcept; /** * This object will be destroyed again during * `IConnectionPoint::disconnect()`. */ - virtual ~Vst3ConnectionPointProxy(); + virtual ~Vst3ConnectionPointProxy() noexcept; DECLARE_FUNKNOWN_METHODS /** * Get the instance ID of the owner of this object. */ - inline size_t owner_instance_id() const { + inline size_t owner_instance_id() const noexcept { return arguments.owner_instance_id; } diff --git a/src/common/serialization/vst3/context-menu-proxy.cpp b/src/common/serialization/vst3/context-menu-proxy.cpp index 20cb1df7..4d52d413 100644 --- a/src/common/serialization/vst3/context-menu-proxy.cpp +++ b/src/common/serialization/vst3/context-menu-proxy.cpp @@ -16,21 +16,21 @@ #include "context-menu-proxy.h" -Vst3ContextMenuProxy::ConstructArgs::ConstructArgs() {} +Vst3ContextMenuProxy::ConstructArgs::ConstructArgs() noexcept {} Vst3ContextMenuProxy::ConstructArgs::ConstructArgs( Steinberg::IPtr object, size_t owner_instance_id, - size_t context_menu_id) + size_t context_menu_id) noexcept : owner_instance_id(owner_instance_id), context_menu_id(context_menu_id), context_menu_args(object) {} -Vst3ContextMenuProxy::Vst3ContextMenuProxy(const ConstructArgs&& args) +Vst3ContextMenuProxy::Vst3ContextMenuProxy(const ConstructArgs&& args) noexcept : YaContextMenu(std::move(args.context_menu_args)), arguments(std::move(args)){FUNKNOWN_CTOR} - Vst3ContextMenuProxy::~Vst3ContextMenuProxy() { + Vst3ContextMenuProxy::~Vst3ContextMenuProxy() noexcept { FUNKNOWN_DTOR } diff --git a/src/common/serialization/vst3/context-menu-proxy.h b/src/common/serialization/vst3/context-menu-proxy.h index 1d7182b8..3f63eb6d 100644 --- a/src/common/serialization/vst3/context-menu-proxy.h +++ b/src/common/serialization/vst3/context-menu-proxy.h @@ -41,7 +41,7 @@ class Vst3ContextMenuProxy : public YaContextMenu { * These are the arguments for constructing a `Vst3ContextMenuProxyImpl`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Read from an existing object. We will try to mimic this object, so @@ -49,7 +49,7 @@ class Vst3ContextMenuProxy : public YaContextMenu { */ ConstructArgs(Steinberg::IPtr object, size_t owner_instance_id, - size_t context_menu_id); + size_t context_menu_id) noexcept; /** * The unique instance identifier of the proxy object instance this @@ -90,7 +90,7 @@ class Vst3ContextMenuProxy : public YaContextMenu { * struct. We need to use raw pointers or references here so we can refer * to the object without interfering with the reference count. */ - Vst3ContextMenuProxy(const ConstructArgs&& args); + Vst3ContextMenuProxy(const ConstructArgs&& args) noexcept; /** * Message to request the plugin to drop the the `IContextMenu*` returned by @@ -115,21 +115,23 @@ class Vst3ContextMenuProxy : public YaContextMenu { * the pointer to the actual `IContextMenu*` returend by the host during * `IComponentHandler3::createContextMenu`. */ - virtual ~Vst3ContextMenuProxy() = 0; + virtual ~Vst3ContextMenuProxy() noexcept = 0; DECLARE_FUNKNOWN_METHODS /** * Get the instance ID of the owner of this object. */ - inline size_t owner_instance_id() const { + inline size_t owner_instance_id() const noexcept { return arguments.owner_instance_id; } /** * Get the unique ID for this context menu. */ - inline size_t context_menu_id() const { return arguments.context_menu_id; } + inline size_t context_menu_id() const noexcept { + return arguments.context_menu_id; + } private: ConstructArgs arguments; diff --git a/src/common/serialization/vst3/context-menu-target.cpp b/src/common/serialization/vst3/context-menu-target.cpp index c54fe95c..a6186405 100644 --- a/src/common/serialization/vst3/context-menu-target.cpp +++ b/src/common/serialization/vst3/context-menu-target.cpp @@ -16,20 +16,20 @@ #include "context-menu-target.h" -YaContextMenuTarget::ConstructArgs::ConstructArgs() {} +YaContextMenuTarget::ConstructArgs::ConstructArgs() noexcept {} YaContextMenuTarget::ConstructArgs::ConstructArgs( native_size_t owner_instance_id, native_size_t context_menu_id, - int32 tag) + int32 tag) noexcept : owner_instance_id(owner_instance_id), context_menu_id(context_menu_id), tag(tag) {} -YaContextMenuTarget::YaContextMenuTarget(const ConstructArgs&& args) +YaContextMenuTarget::YaContextMenuTarget(const ConstructArgs&& args) noexcept : arguments(std::move(args)){FUNKNOWN_CTOR} - YaContextMenuTarget::~YaContextMenuTarget() { + YaContextMenuTarget::~YaContextMenuTarget() noexcept { FUNKNOWN_DTOR } diff --git a/src/common/serialization/vst3/context-menu-target.h b/src/common/serialization/vst3/context-menu-target.h index 3c697aa4..fffb3eff 100644 --- a/src/common/serialization/vst3/context-menu-target.h +++ b/src/common/serialization/vst3/context-menu-target.h @@ -37,7 +37,7 @@ class YaContextMenuTarget : public Steinberg::Vst::IContextMenuTarget { * `YaContextMenuTargetImpl`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Read from an existing object. We will try to mimic this object, so @@ -51,7 +51,7 @@ class YaContextMenuTarget : public Steinberg::Vst::IContextMenuTarget { */ ConstructArgs(native_size_t owner_instance_id, native_size_t context_menu_id, - int32 tag); + int32 tag) noexcept; native_size_t owner_instance_id; native_size_t context_menu_id; @@ -69,16 +69,16 @@ class YaContextMenuTarget : public Steinberg::Vst::IContextMenuTarget { * Create context menu target that when called, calls the corresponding * context menu target provided by the object. */ - YaContextMenuTarget(const ConstructArgs&& args); + YaContextMenuTarget(const ConstructArgs&& args) noexcept; - ~YaContextMenuTarget(); + ~YaContextMenuTarget() noexcept; DECLARE_FUNKNOWN_METHODS /** * Get the instance ID of the owner of this object. */ - inline size_t owner_instance_id() const { + inline size_t owner_instance_id() const noexcept { return arguments.owner_instance_id; } diff --git a/src/common/serialization/vst3/context-menu/context-menu.cpp b/src/common/serialization/vst3/context-menu/context-menu.cpp index 4d80cdf5..1601ad90 100644 --- a/src/common/serialization/vst3/context-menu/context-menu.cpp +++ b/src/common/serialization/vst3/context-menu/context-menu.cpp @@ -16,11 +16,11 @@ #include "context-menu.h" -YaContextMenu::ConstructArgs::ConstructArgs() {} +YaContextMenu::ConstructArgs::ConstructArgs() noexcept {} YaContextMenu::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported(Steinberg::FUnknownPtr(object)) {} -YaContextMenu::YaContextMenu(const ConstructArgs&& args) +YaContextMenu::YaContextMenu(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/context-menu/context-menu.h b/src/common/serialization/vst3/context-menu/context-menu.h index 95d3d44c..dd90524c 100644 --- a/src/common/serialization/vst3/context-menu/context-menu.h +++ b/src/common/serialization/vst3/context-menu/context-menu.h @@ -36,13 +36,13 @@ class YaContextMenu : public Steinberg::Vst::IContextMenu { * These are the arguments for creating a `YaContextMenu`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements `IContextMenu` * and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -59,9 +59,9 @@ class YaContextMenu : public Steinberg::Vst::IContextMenu { * Instantiate this instance with arguments read from another interface * implementation. */ - YaContextMenu(const ConstructArgs&& args); + YaContextMenu(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to `IContextMenu::getItemCount()` to the diff --git a/src/common/serialization/vst3/event-list.cpp b/src/common/serialization/vst3/event-list.cpp index aec4ea2e..48ab4440 100644 --- a/src/common/serialization/vst3/event-list.cpp +++ b/src/common/serialization/vst3/event-list.cpp @@ -18,26 +18,27 @@ #include "src/common/utils.h" -YaDataEvent::YaDataEvent() {} +YaDataEvent::YaDataEvent() noexcept {} -YaDataEvent::YaDataEvent(const Steinberg::Vst::DataEvent& event) +YaDataEvent::YaDataEvent(const Steinberg::Vst::DataEvent& event) noexcept : type(event.type), buffer(event.bytes, event.bytes + event.size) {} -Steinberg::Vst::DataEvent YaDataEvent::get() const { +Steinberg::Vst::DataEvent YaDataEvent::get() const noexcept { return Steinberg::Vst::DataEvent{.size = static_cast(buffer.size()), .type = type, .bytes = buffer.data()}; } -YaNoteExpressionTextEvent::YaNoteExpressionTextEvent() {} +YaNoteExpressionTextEvent::YaNoteExpressionTextEvent() noexcept {} YaNoteExpressionTextEvent::YaNoteExpressionTextEvent( - const Steinberg::Vst::NoteExpressionTextEvent& event) + const Steinberg::Vst::NoteExpressionTextEvent& event) noexcept : type_id(event.typeId), note_id(event.noteId), text(tchar_pointer_to_u16string(event.text, event.textLen)) {} -Steinberg::Vst::NoteExpressionTextEvent YaNoteExpressionTextEvent::get() const { +Steinberg::Vst::NoteExpressionTextEvent YaNoteExpressionTextEvent::get() + const noexcept { return Steinberg::Vst::NoteExpressionTextEvent{ .typeId = type_id, .noteId = note_id, @@ -45,15 +46,15 @@ Steinberg::Vst::NoteExpressionTextEvent YaNoteExpressionTextEvent::get() const { .text = u16string_to_tchar_pointer(text)}; } -YaChordEvent::YaChordEvent() {} +YaChordEvent::YaChordEvent() noexcept {} -YaChordEvent::YaChordEvent(const Steinberg::Vst::ChordEvent& event) +YaChordEvent::YaChordEvent(const Steinberg::Vst::ChordEvent& event) noexcept : root(event.root), bass_note(event.bassNote), mask(event.mask), text(tchar_pointer_to_u16string(event.text, event.textLen)) {} -Steinberg::Vst::ChordEvent YaChordEvent::get() const { +Steinberg::Vst::ChordEvent YaChordEvent::get() const noexcept { return Steinberg::Vst::ChordEvent{ .root = root, .bassNote = bass_note, @@ -62,14 +63,14 @@ Steinberg::Vst::ChordEvent YaChordEvent::get() const { .text = u16string_to_tchar_pointer(text)}; } -YaScaleEvent::YaScaleEvent() {} +YaScaleEvent::YaScaleEvent() noexcept {} -YaScaleEvent::YaScaleEvent(const Steinberg::Vst::ScaleEvent& event) +YaScaleEvent::YaScaleEvent(const Steinberg::Vst::ScaleEvent& event) noexcept : root(event.root), mask(event.mask), text(tchar_pointer_to_u16string(event.text, event.textLen)) {} -Steinberg::Vst::ScaleEvent YaScaleEvent::get() const { +Steinberg::Vst::ScaleEvent YaScaleEvent::get() const noexcept { return Steinberg::Vst::ScaleEvent{ .root = root, .mask = mask, @@ -77,9 +78,9 @@ Steinberg::Vst::ScaleEvent YaScaleEvent::get() const { .text = u16string_to_tchar_pointer(text)}; } -YaEvent::YaEvent() {} +YaEvent::YaEvent() noexcept {} -YaEvent::YaEvent(const Steinberg::Vst::Event& event) +YaEvent::YaEvent(const Steinberg::Vst::Event& event) noexcept : bus_index(event.busIndex), sample_offset(event.sampleOffset), ppq_position(event.ppqPosition), @@ -121,7 +122,7 @@ YaEvent::YaEvent(const Steinberg::Vst::Event& event) } } -Steinberg::Vst::Event YaEvent::get() const { +Steinberg::Vst::Event YaEvent::get() const noexcept { // We of course can't fully initialize a field with an untagged union #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmissing-field-initializers" @@ -174,11 +175,11 @@ Steinberg::Vst::Event YaEvent::get() const { return event; } -YaEventList::YaEventList() { +YaEventList::YaEventList() noexcept { FUNKNOWN_CTOR } -void YaEventList::clear() { +void YaEventList::clear() noexcept { events.clear(); } @@ -195,9 +196,9 @@ void YaEventList::repopulate(Steinberg::Vst::IEventList& event_list) { } } -YaEventList::~YaEventList(){FUNKNOWN_DTOR} +YaEventList::~YaEventList() noexcept {FUNKNOWN_DTOR} -size_t YaEventList::num_events() const { +size_t YaEventList::num_events() const noexcept { return events.size(); } diff --git a/src/common/serialization/vst3/event-list.h b/src/common/serialization/vst3/event-list.h index 17b639cb..7e1a2f06 100644 --- a/src/common/serialization/vst3/event-list.h +++ b/src/common/serialization/vst3/event-list.h @@ -29,12 +29,12 @@ * contains a heap array. */ struct YaDataEvent { - YaDataEvent(); + YaDataEvent() noexcept; /** * Copy data from an existing `DataEvent`. */ - YaDataEvent(const Steinberg::Vst::DataEvent& event); + YaDataEvent(const Steinberg::Vst::DataEvent& event) noexcept; /** * Reconstruct a `DataEvent` from this object. @@ -42,7 +42,7 @@ struct YaDataEvent { * @note This object may contain pointers to data stored in this object, and * must thus not outlive it. */ - Steinberg::Vst::DataEvent get() const; + Steinberg::Vst::DataEvent get() const noexcept; uint32 type; std::vector buffer; @@ -59,13 +59,13 @@ struct YaDataEvent { * this event contains a heap array. */ struct YaNoteExpressionTextEvent { - YaNoteExpressionTextEvent(); + YaNoteExpressionTextEvent() noexcept; /** * Copy data from an existing `NoteExpressionTextEvent`. */ YaNoteExpressionTextEvent( - const Steinberg::Vst::NoteExpressionTextEvent& event); + const Steinberg::Vst::NoteExpressionTextEvent& event) noexcept; /** * Reconstruct a `NoteExpressionTextEvent` from this object. @@ -73,7 +73,7 @@ struct YaNoteExpressionTextEvent { * @note This object may contain pointers to data stored in this object, and * must thus not outlive it. */ - Steinberg::Vst::NoteExpressionTextEvent get() const; + Steinberg::Vst::NoteExpressionTextEvent get() const noexcept; Steinberg::Vst::NoteExpressionTypeID type_id; int32 note_id; @@ -93,12 +93,12 @@ struct YaNoteExpressionTextEvent { * contains a heap array. */ struct YaChordEvent { - YaChordEvent(); + YaChordEvent() noexcept; /** * Copy data from an existing `ChordEvent`. */ - YaChordEvent(const Steinberg::Vst::ChordEvent& event); + YaChordEvent(const Steinberg::Vst::ChordEvent& event) noexcept; /** * Reconstruct a `ChordEvent` from this object. @@ -106,7 +106,7 @@ struct YaChordEvent { * @note This object may contain pointers to data stored in this object, and * must thus not outlive it. */ - Steinberg::Vst::ChordEvent get() const; + Steinberg::Vst::ChordEvent get() const noexcept; int16 root; int16 bass_note; @@ -128,12 +128,12 @@ struct YaChordEvent { * contains a heap array. */ struct YaScaleEvent { - YaScaleEvent(); + YaScaleEvent() noexcept; /** * Copy data from an existing `ScaleEvent`. */ - YaScaleEvent(const Steinberg::Vst::ScaleEvent& event); + YaScaleEvent(const Steinberg::Vst::ScaleEvent& event) noexcept; /** * Reconstruct a `ScaleEvent` from this object. @@ -141,7 +141,7 @@ struct YaScaleEvent { * @note This object may contain pointers to data stored in this object, and * must thus not outlive it. */ - Steinberg::Vst::ScaleEvent get() const; + Steinberg::Vst::ScaleEvent get() const noexcept; int16 root; int16 mask; @@ -161,12 +161,12 @@ struct YaScaleEvent { * include heap pointers. */ struct YaEvent { - YaEvent(); + YaEvent() noexcept; /** * Copy data from an `Event`. */ - YaEvent(const Steinberg::Vst::Event& event); + YaEvent(const Steinberg::Vst::Event& event) noexcept; /** * Reconstruct an `Event` from this object. @@ -174,7 +174,7 @@ struct YaEvent { * @note This object may contain pointers to data stored in this object, and * must thus not outlive it. */ - Steinberg::Vst::Event get() const; + Steinberg::Vst::Event get() const noexcept; // These fields directly reflect those from `Event` int32 bus_index; @@ -217,28 +217,28 @@ class YaEventList : public Steinberg::Vst::IEventList { * existing object with new events every processing cycle to avoid * reallocating a new object every time. */ - YaEventList(); + YaEventList() noexcept; /** * Remove all events. Used when a null pointer gets passed to the input * events field, and so the plugin can output its own events if the host * supports this. */ - void clear(); + void clear() noexcept; /** * Read data from an `IEventList` object into this existing object. */ void repopulate(Steinberg::Vst::IEventList& event_list); - ~YaEventList(); + ~YaEventList() noexcept; DECLARE_FUNKNOWN_METHODS /** * Return the number of events we store. Used in debug logs. */ - size_t num_events() const; + size_t num_events() const noexcept; /** * Write these events an output events queue on the `ProcessData` object diff --git a/src/common/serialization/vst3/host-context-proxy.cpp b/src/common/serialization/vst3/host-context-proxy.cpp index 39f674d0..b9fbdb36 100644 --- a/src/common/serialization/vst3/host-context-proxy.cpp +++ b/src/common/serialization/vst3/host-context-proxy.cpp @@ -16,21 +16,21 @@ #include "host-context-proxy.h" -Vst3HostContextProxy::ConstructArgs::ConstructArgs() {} +Vst3HostContextProxy::ConstructArgs::ConstructArgs() noexcept {} Vst3HostContextProxy::ConstructArgs::ConstructArgs( Steinberg::IPtr object, - std::optional owner_instance_id) + std::optional owner_instance_id) noexcept : owner_instance_id(owner_instance_id), host_application_args(object), plug_interface_support_args(object) {} -Vst3HostContextProxy::Vst3HostContextProxy(const ConstructArgs&& args) +Vst3HostContextProxy::Vst3HostContextProxy(const ConstructArgs&& args) noexcept : YaHostApplication(std::move(args.host_application_args)), YaPlugInterfaceSupport(std::move(args.plug_interface_support_args)), arguments(std::move(args)){FUNKNOWN_CTOR} - Vst3HostContextProxy::~Vst3HostContextProxy() { + Vst3HostContextProxy::~Vst3HostContextProxy() noexcept { FUNKNOWN_DTOR } diff --git a/src/common/serialization/vst3/host-context-proxy.h b/src/common/serialization/vst3/host-context-proxy.h index 24fd04fa..5a4fd313 100644 --- a/src/common/serialization/vst3/host-context-proxy.h +++ b/src/common/serialization/vst3/host-context-proxy.h @@ -41,14 +41,14 @@ class Vst3HostContextProxy : public YaHostApplication, * `Vst3HostContextProxyImpl`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Read from an existing object. We will try to mimic this object, so * we'll support any interfaces this object also supports. */ ConstructArgs(Steinberg::IPtr object, - std::optional owner_instance_id); + std::optional owner_instance_id) noexcept; /** * The unique instance identifier of the proxy object instance this host @@ -81,7 +81,7 @@ class Vst3HostContextProxy : public YaHostApplication, * objects they are passed to. If those objects get dropped, then the host * contexts should also be dropped. */ - Vst3HostContextProxy(const ConstructArgs&& args); + Vst3HostContextProxy(const ConstructArgs&& args) noexcept; /** * The lifetime of this object should be bound to the object we created it @@ -89,7 +89,7 @@ class Vst3HostContextProxy : public YaHostApplication, * dropped a corresponding `Vst3HostContextProxyImpl` should also be * dropped. */ - virtual ~Vst3HostContextProxy(); + virtual ~Vst3HostContextProxy() noexcept; DECLARE_FUNKNOWN_METHODS @@ -97,7 +97,7 @@ class Vst3HostContextProxy : public YaHostApplication, * Get the instance ID of the owner of this object, if this is not the * global host context passed to the module's plugin factory. */ - inline std::optional owner_instance_id() const { + inline std::optional owner_instance_id() const noexcept { return arguments.owner_instance_id; } diff --git a/src/common/serialization/vst3/host-context/host-application.cpp b/src/common/serialization/vst3/host-context/host-application.cpp index d27e1837..4cd723cb 100644 --- a/src/common/serialization/vst3/host-context/host-application.cpp +++ b/src/common/serialization/vst3/host-context/host-application.cpp @@ -16,12 +16,12 @@ #include "host-application.h" -YaHostApplication::ConstructArgs::ConstructArgs() {} +YaHostApplication::ConstructArgs::ConstructArgs() noexcept {} YaHostApplication::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported( Steinberg::FUnknownPtr(object)) {} -YaHostApplication::YaHostApplication(const ConstructArgs&& args) +YaHostApplication::YaHostApplication(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/host-context/host-application.h b/src/common/serialization/vst3/host-context/host-application.h index 84556516..77d2308b 100644 --- a/src/common/serialization/vst3/host-context/host-application.h +++ b/src/common/serialization/vst3/host-context/host-application.h @@ -38,13 +38,13 @@ class YaHostApplication : public Steinberg::Vst::IHostApplication { * These are the arguments for creating a `YaHostApplication`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `IHostApplication` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -61,9 +61,9 @@ class YaHostApplication : public Steinberg::Vst::IHostApplication { * Instantiate this instance with arguments read from another interface * implementation. */ - YaHostApplication(const ConstructArgs&& args); + YaHostApplication(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * The response code and resulting value for a call to diff --git a/src/common/serialization/vst3/host-context/plug-interface-support.cpp b/src/common/serialization/vst3/host-context/plug-interface-support.cpp index c0222b91..45610ed9 100644 --- a/src/common/serialization/vst3/host-context/plug-interface-support.cpp +++ b/src/common/serialization/vst3/host-context/plug-interface-support.cpp @@ -16,12 +16,12 @@ #include "plug-interface-support.h" -YaPlugInterfaceSupport::ConstructArgs::ConstructArgs() {} +YaPlugInterfaceSupport::ConstructArgs::ConstructArgs() noexcept {} YaPlugInterfaceSupport::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported(Steinberg::FUnknownPtr( object)) {} -YaPlugInterfaceSupport::YaPlugInterfaceSupport(const ConstructArgs&& args) +YaPlugInterfaceSupport::YaPlugInterfaceSupport(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/host-context/plug-interface-support.h b/src/common/serialization/vst3/host-context/plug-interface-support.h index 1416fcad..3860fdea 100644 --- a/src/common/serialization/vst3/host-context/plug-interface-support.h +++ b/src/common/serialization/vst3/host-context/plug-interface-support.h @@ -35,13 +35,13 @@ class YaPlugInterfaceSupport : public Steinberg::Vst::IPlugInterfaceSupport { * These are the arguments for creating a `YaPlugInterfaceSupport`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `IPlugInterfaceSupport` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -58,9 +58,9 @@ class YaPlugInterfaceSupport : public Steinberg::Vst::IPlugInterfaceSupport { * Instantiate this instance with arguments read from another interface * implementation. */ - YaPlugInterfaceSupport(const ConstructArgs&& args); + YaPlugInterfaceSupport(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to diff --git a/src/common/serialization/vst3/message.cpp b/src/common/serialization/vst3/message.cpp index bc28bd68..338f1632 100644 --- a/src/common/serialization/vst3/message.cpp +++ b/src/common/serialization/vst3/message.cpp @@ -16,7 +16,7 @@ #include "message.h" -YaMessagePtr::YaMessagePtr(){FUNKNOWN_CTOR} +YaMessagePtr::YaMessagePtr() noexcept {FUNKNOWN_CTOR} YaMessagePtr::YaMessagePtr(IMessage& message) : message_id(message.getMessageID() @@ -25,7 +25,7 @@ YaMessagePtr::YaMessagePtr(IMessage& message) original_message_ptr(static_cast( reinterpret_cast(&message))){FUNKNOWN_CTOR} - YaMessagePtr::~YaMessagePtr() { + YaMessagePtr::~YaMessagePtr() noexcept { FUNKNOWN_DTOR } @@ -36,7 +36,7 @@ IMPLEMENT_FUNKNOWN_METHODS(YaMessagePtr, Steinberg::Vst::IMessage::iid) #pragma GCC diagnostic pop -Steinberg::Vst::IMessage* YaMessagePtr::get_original() const { +Steinberg::Vst::IMessage* YaMessagePtr::get_original() const noexcept { // See the docstrings on `YaMessage` and `YaMessagePtr` return reinterpret_cast( static_cast(original_message_ptr)); @@ -62,9 +62,9 @@ Steinberg::Vst::IAttributeList* PLUGIN_API YaMessagePtr::getAttributes() { return &attribute_list; } -YaMessage::YaMessage(){FUNKNOWN_CTOR} +YaMessage::YaMessage() noexcept {FUNKNOWN_CTOR} -YaMessage::~YaMessage() { +YaMessage::~YaMessage() noexcept { FUNKNOWN_DTOR } diff --git a/src/common/serialization/vst3/message.h b/src/common/serialization/vst3/message.h index 19e5db63..7337f110 100644 --- a/src/common/serialization/vst3/message.h +++ b/src/common/serialization/vst3/message.h @@ -43,7 +43,7 @@ */ class YaMessagePtr : public Steinberg::Vst::IMessage { public: - YaMessagePtr(); + YaMessagePtr() noexcept; /** * Create a proxy for this message. We'll store the message's ID for logging @@ -54,7 +54,7 @@ class YaMessagePtr : public Steinberg::Vst::IMessage { */ explicit YaMessagePtr(IMessage& message); - ~YaMessagePtr(); + ~YaMessagePtr() noexcept; DECLARE_FUNKNOWN_METHODS @@ -63,7 +63,7 @@ class YaMessagePtr : public Steinberg::Vst::IMessage { * constructor. This should be used on the Wine plugin host side when * handling `IConnectionPoint::notify`. */ - Steinberg::Vst::IMessage* get_original() const; + Steinberg::Vst::IMessage* get_original() const noexcept; virtual Steinberg::FIDString PLUGIN_API getMessageID() override; virtual void PLUGIN_API @@ -122,9 +122,9 @@ class YaMessage : public Steinberg::Vst::IMessage { * Default constructor with an empty message. The plugin can use this to * write a message. */ - YaMessage(); + YaMessage() noexcept; - ~YaMessage(); + ~YaMessage() noexcept; DECLARE_FUNKNOWN_METHODS diff --git a/src/common/serialization/vst3/param-value-queue.cpp b/src/common/serialization/vst3/param-value-queue.cpp index de814ca5..89de209e 100644 --- a/src/common/serialization/vst3/param-value-queue.cpp +++ b/src/common/serialization/vst3/param-value-queue.cpp @@ -16,12 +16,14 @@ #include "param-value-queue.h" -YaParamValueQueue::YaParamValueQueue() { - FUNKNOWN_CTOR +YaParamValueQueue::YaParamValueQueue() noexcept {FUNKNOWN_CTOR} + +YaParamValueQueue::~YaParamValueQueue() noexcept { + FUNKNOWN_DTOR } void YaParamValueQueue::clear_for_parameter( - Steinberg::Vst::ParamID parameter_id) { + Steinberg::Vst::ParamID parameter_id) noexcept { this->parameter_id = parameter_id; queue.clear(); } @@ -39,10 +41,6 @@ void YaParamValueQueue::repopulate( } } -YaParamValueQueue::~YaParamValueQueue() { - FUNKNOWN_DTOR -} - #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor" IMPLEMENT_FUNKNOWN_METHODS(YaParamValueQueue, diff --git a/src/common/serialization/vst3/param-value-queue.h b/src/common/serialization/vst3/param-value-queue.h index 65d6f25c..2521ba17 100644 --- a/src/common/serialization/vst3/param-value-queue.h +++ b/src/common/serialization/vst3/param-value-queue.h @@ -36,20 +36,20 @@ class YaParamValueQueue : public Steinberg::Vst::IParamValueQueue { * existing object with new data every processing cycle to avoid * reallocating a new object every time. */ - YaParamValueQueue(); + YaParamValueQueue() noexcept; /** * Clear this queue in place so that it can be used to write parameter data * to. Used in `YaParameterChanges::addParameterData`. */ - void clear_for_parameter(Steinberg::Vst::ParamID parameter_id); + void clear_for_parameter(Steinberg::Vst::ParamID parameter_id) noexcept; /** * Read data from an `IParamValueQueue` object into this existing object. */ void repopulate(Steinberg::Vst::IParamValueQueue& original_queue); - ~YaParamValueQueue(); + ~YaParamValueQueue() noexcept; DECLARE_FUNKNOWN_METHODS diff --git a/src/common/serialization/vst3/parameter-changes.cpp b/src/common/serialization/vst3/parameter-changes.cpp index df3b4b48..b6e51dbd 100644 --- a/src/common/serialization/vst3/parameter-changes.cpp +++ b/src/common/serialization/vst3/parameter-changes.cpp @@ -16,11 +16,13 @@ #include "parameter-changes.h" -YaParameterChanges::YaParameterChanges() { - FUNKNOWN_CTOR +YaParameterChanges::YaParameterChanges() noexcept {FUNKNOWN_CTOR} + +YaParameterChanges::~YaParameterChanges() noexcept { + FUNKNOWN_DTOR } -void YaParameterChanges::clear() { +void YaParameterChanges::clear() noexcept { queues.clear(); } @@ -33,10 +35,6 @@ void YaParameterChanges::repopulate( } } -YaParameterChanges::~YaParameterChanges() { - FUNKNOWN_DTOR -} - #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor" IMPLEMENT_FUNKNOWN_METHODS(YaParameterChanges, diff --git a/src/common/serialization/vst3/parameter-changes.h b/src/common/serialization/vst3/parameter-changes.h index edeb4e7c..43800ce8 100644 --- a/src/common/serialization/vst3/parameter-changes.h +++ b/src/common/serialization/vst3/parameter-changes.h @@ -35,22 +35,22 @@ class YaParameterChanges : public Steinberg::Vst::IParameterChanges { * existing object with new data every processing cycle to avoid * reallocating a new object every time. */ - YaParameterChanges(); + YaParameterChanges() noexcept; + + ~YaParameterChanges() noexcept; /** * Remove all parameter changes. Used when a null pointer gets passed to the * input parameters field, and so the plugin can output its own parameter * changes. */ - void clear(); + void clear() noexcept; /** * Read data from an `IParameterChanges` object into this existing object. */ void repopulate(Steinberg::Vst::IParameterChanges& original_queues); - ~YaParameterChanges(); - DECLARE_FUNKNOWN_METHODS /** diff --git a/src/common/serialization/vst3/physical-ui-map-list.cpp b/src/common/serialization/vst3/physical-ui-map-list.cpp index 419b3c74..4c0ce9e7 100644 --- a/src/common/serialization/vst3/physical-ui-map-list.cpp +++ b/src/common/serialization/vst3/physical-ui-map-list.cpp @@ -18,13 +18,13 @@ #include -YaPhysicalUIMapList::YaPhysicalUIMapList() {} +YaPhysicalUIMapList::YaPhysicalUIMapList() noexcept {} YaPhysicalUIMapList::YaPhysicalUIMapList( - const Steinberg::Vst::PhysicalUIMapList& list) + const Steinberg::Vst::PhysicalUIMapList& list) noexcept : maps(list.map, list.map + list.count) {} -Steinberg::Vst::PhysicalUIMapList YaPhysicalUIMapList::get() { +Steinberg::Vst::PhysicalUIMapList YaPhysicalUIMapList::get() noexcept { return Steinberg::Vst::PhysicalUIMapList{ .count = static_cast(maps.size()), .map = maps.data()}; diff --git a/src/common/serialization/vst3/physical-ui-map-list.h b/src/common/serialization/vst3/physical-ui-map-list.h index 98673e5c..2dc352bb 100644 --- a/src/common/serialization/vst3/physical-ui-map-list.h +++ b/src/common/serialization/vst3/physical-ui-map-list.h @@ -29,12 +29,12 @@ */ class YaPhysicalUIMapList { public: - YaPhysicalUIMapList(); + YaPhysicalUIMapList() noexcept; /** * Copy the data from a `PhysicalUIMapList` so it can be serialized. */ - YaPhysicalUIMapList(const Steinberg::Vst::PhysicalUIMapList& list); + YaPhysicalUIMapList(const Steinberg::Vst::PhysicalUIMapList& list) noexcept; /** * Reconstruct the original `PhysicalUIMapList` object passed to the @@ -43,7 +43,7 @@ class YaPhysicalUIMapList { * plugin host side. The returned object is valid as long as this object is * alive. */ - Steinberg::Vst::PhysicalUIMapList get(); + Steinberg::Vst::PhysicalUIMapList get() noexcept; /** * Write the `noteExpressionTypeID` values stored in `maps` back to the diff --git a/src/common/serialization/vst3/plug-frame-proxy.cpp b/src/common/serialization/vst3/plug-frame-proxy.cpp index 3a29db9d..59e85063 100644 --- a/src/common/serialization/vst3/plug-frame-proxy.cpp +++ b/src/common/serialization/vst3/plug-frame-proxy.cpp @@ -16,18 +16,18 @@ #include "plug-frame-proxy.h" -Vst3PlugFrameProxy::ConstructArgs::ConstructArgs() {} +Vst3PlugFrameProxy::ConstructArgs::ConstructArgs() noexcept {} Vst3PlugFrameProxy::ConstructArgs::ConstructArgs( Steinberg::IPtr object, - size_t owner_instance_id) + size_t owner_instance_id) noexcept : owner_instance_id(owner_instance_id), plug_frame_args(object) {} -Vst3PlugFrameProxy::Vst3PlugFrameProxy(const ConstructArgs&& args) +Vst3PlugFrameProxy::Vst3PlugFrameProxy(const ConstructArgs&& args) noexcept : YaPlugFrame(std::move(args.plug_frame_args)), arguments(std::move(args)){FUNKNOWN_CTOR} - Vst3PlugFrameProxy::~Vst3PlugFrameProxy() { + Vst3PlugFrameProxy::~Vst3PlugFrameProxy() noexcept { FUNKNOWN_DTOR } diff --git a/src/common/serialization/vst3/plug-frame-proxy.h b/src/common/serialization/vst3/plug-frame-proxy.h index b43280fc..2be1390b 100644 --- a/src/common/serialization/vst3/plug-frame-proxy.h +++ b/src/common/serialization/vst3/plug-frame-proxy.h @@ -36,14 +36,14 @@ class Vst3PlugFrameProxy : public YaPlugFrame { * `Vst3PlugFrameProxyImpl`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Read from an existing object. We will try to mimic this object, so * we'll support any interfaces this object also supports. */ ConstructArgs(Steinberg::IPtr object, - size_t owner_instance_id); + size_t owner_instance_id) noexcept; /** * The unique instance identifier of the proxy object instance this @@ -71,7 +71,7 @@ class Vst3PlugFrameProxy : public YaPlugFrame { * lifetime is bound to that of the objects they are passed to. If the * plug view instance gets dropped, this proxy should also be dropped. */ - Vst3PlugFrameProxy(const ConstructArgs&& args); + Vst3PlugFrameProxy(const ConstructArgs&& args) noexcept; /** * The lifetime of this object should be bound to the object we created it @@ -79,14 +79,14 @@ class Vst3PlugFrameProxy : public YaPlugFrame { * `n` gets dropped, the corresponding `Vst3PlugFrameProxy` should also be * dropped. */ - virtual ~Vst3PlugFrameProxy(); + virtual ~Vst3PlugFrameProxy() noexcept; DECLARE_FUNKNOWN_METHODS /** * Get the instance ID of the owner of this object. */ - inline size_t owner_instance_id() const { + inline size_t owner_instance_id() const noexcept { return arguments.owner_instance_id; } diff --git a/src/common/serialization/vst3/plug-frame/plug-frame.cpp b/src/common/serialization/vst3/plug-frame/plug-frame.cpp index f8f3e391..95a7d830 100644 --- a/src/common/serialization/vst3/plug-frame/plug-frame.cpp +++ b/src/common/serialization/vst3/plug-frame/plug-frame.cpp @@ -16,11 +16,11 @@ #include "plug-frame.h" -YaPlugFrame::ConstructArgs::ConstructArgs() {} +YaPlugFrame::ConstructArgs::ConstructArgs() noexcept {} YaPlugFrame::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported(Steinberg::FUnknownPtr(object)) {} -YaPlugFrame::YaPlugFrame(const ConstructArgs&& args) +YaPlugFrame::YaPlugFrame(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plug-frame/plug-frame.h b/src/common/serialization/vst3/plug-frame/plug-frame.h index fb810b1a..64609dff 100644 --- a/src/common/serialization/vst3/plug-frame/plug-frame.h +++ b/src/common/serialization/vst3/plug-frame/plug-frame.h @@ -34,13 +34,13 @@ class YaPlugFrame : public Steinberg::IPlugFrame { * These are the arguments for creating a `YaPlugFrame`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements `IPlugFrame` and * read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -57,9 +57,9 @@ class YaPlugFrame : public Steinberg::IPlugFrame { * Instantiate this instance with arguments read from another interface * implementation. */ - YaPlugFrame(const ConstructArgs&& args); + YaPlugFrame(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to `IPlugFrame::resizeView(, diff --git a/src/common/serialization/vst3/plug-view-proxy.cpp b/src/common/serialization/vst3/plug-view-proxy.cpp index 26275736..75ef9fef 100644 --- a/src/common/serialization/vst3/plug-view-proxy.cpp +++ b/src/common/serialization/vst3/plug-view-proxy.cpp @@ -16,24 +16,24 @@ #include "plug-view-proxy.h" -Vst3PlugViewProxy::ConstructArgs::ConstructArgs() {} +Vst3PlugViewProxy::ConstructArgs::ConstructArgs() noexcept {} Vst3PlugViewProxy::ConstructArgs::ConstructArgs( Steinberg::IPtr object, - size_t owner_instance_id) + size_t owner_instance_id) noexcept : owner_instance_id(owner_instance_id), plug_view_args(object), parameter_finder_args(object), plug_view_content_scale_support_args(object) {} -Vst3PlugViewProxy::Vst3PlugViewProxy(const ConstructArgs&& args) +Vst3PlugViewProxy::Vst3PlugViewProxy(const ConstructArgs&& args) noexcept : YaPlugView(std::move(args.plug_view_args)), YaParameterFinder(std::move(args.parameter_finder_args)), YaPlugViewContentScaleSupport( std::move(args.plug_view_content_scale_support_args)), arguments(std::move(args)){FUNKNOWN_CTOR} - Vst3PlugViewProxy::~Vst3PlugViewProxy() { + Vst3PlugViewProxy::~Vst3PlugViewProxy() noexcept { FUNKNOWN_DTOR } diff --git a/src/common/serialization/vst3/plug-view-proxy.h b/src/common/serialization/vst3/plug-view-proxy.h index c16b6bd6..3ceeddf8 100644 --- a/src/common/serialization/vst3/plug-view-proxy.h +++ b/src/common/serialization/vst3/plug-view-proxy.h @@ -40,14 +40,14 @@ class Vst3PlugViewProxy : public YaPlugView, * `Vst3PlugViewProxyImpl`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Read from an existing object. We will try to mimic this object, so * we'll support any interfaces this object also supports. */ ConstructArgs(Steinberg::IPtr object, - size_t owner_instance_id); + size_t owner_instance_id) noexcept; /** * The unique instance identifier of the proxy object that returned this @@ -80,7 +80,7 @@ class Vst3PlugViewProxy : public YaPlugView, * message. The destructor should still send a message to drop the * original smart pointer. */ - Vst3PlugViewProxy(const ConstructArgs&& args); + Vst3PlugViewProxy(const ConstructArgs&& args) noexcept; /** * Message to request the Wine plugin host to destroy the `IPlugView*` @@ -102,14 +102,14 @@ class Vst3PlugViewProxy : public YaPlugView, * @remark The plugin side implementation should send a control message to * clean up the instance on the Wine side in its destructor. */ - virtual ~Vst3PlugViewProxy() = 0; + virtual ~Vst3PlugViewProxy() noexcept = 0; DECLARE_FUNKNOWN_METHODS /** * Get the instance ID of the owner of this object. */ - inline size_t owner_instance_id() const { + inline size_t owner_instance_id() const noexcept { return arguments.owner_instance_id; } diff --git a/src/common/serialization/vst3/plug-view/parameter-finder.cpp b/src/common/serialization/vst3/plug-view/parameter-finder.cpp index 60f10264..78822586 100644 --- a/src/common/serialization/vst3/plug-view/parameter-finder.cpp +++ b/src/common/serialization/vst3/plug-view/parameter-finder.cpp @@ -16,12 +16,12 @@ #include "parameter-finder.h" -YaParameterFinder::ConstructArgs::ConstructArgs() {} +YaParameterFinder::ConstructArgs::ConstructArgs() noexcept {} YaParameterFinder::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported( Steinberg::FUnknownPtr(object)) {} -YaParameterFinder::YaParameterFinder(const ConstructArgs&& args) +YaParameterFinder::YaParameterFinder(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plug-view/parameter-finder.h b/src/common/serialization/vst3/plug-view/parameter-finder.h index 95c405dd..881e0ad0 100644 --- a/src/common/serialization/vst3/plug-view/parameter-finder.h +++ b/src/common/serialization/vst3/plug-view/parameter-finder.h @@ -34,13 +34,13 @@ class YaParameterFinder : public Steinberg::Vst::IParameterFinder { * These are the arguments for creating a `YaParameterFinder`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `IParameterFinder` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -57,9 +57,9 @@ class YaParameterFinder : public Steinberg::Vst::IParameterFinder { * Instantiate this instance with arguments read from another interface * implementation. */ - YaParameterFinder(const ConstructArgs&& args); + YaParameterFinder(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * The response code and editor size returned by a call to diff --git a/src/common/serialization/vst3/plug-view/plug-view-content-scale-support.cpp b/src/common/serialization/vst3/plug-view/plug-view-content-scale-support.cpp index 516474f7..7ff35dd2 100644 --- a/src/common/serialization/vst3/plug-view/plug-view-content-scale-support.cpp +++ b/src/common/serialization/vst3/plug-view/plug-view-content-scale-support.cpp @@ -16,13 +16,13 @@ #include "plug-view-content-scale-support.h" -YaPlugViewContentScaleSupport::ConstructArgs::ConstructArgs() {} +YaPlugViewContentScaleSupport::ConstructArgs::ConstructArgs() noexcept {} YaPlugViewContentScaleSupport::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported(Steinberg::FUnknownPtr( object)) {} YaPlugViewContentScaleSupport::YaPlugViewContentScaleSupport( - const ConstructArgs&& args) + const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plug-view/plug-view-content-scale-support.h b/src/common/serialization/vst3/plug-view/plug-view-content-scale-support.h index de57ac22..26a57f60 100644 --- a/src/common/serialization/vst3/plug-view/plug-view-content-scale-support.h +++ b/src/common/serialization/vst3/plug-view/plug-view-content-scale-support.h @@ -35,13 +35,13 @@ class YaPlugViewContentScaleSupport * These are the arguments for creating a `YaPlugViewContentScaleSupport`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `IPlugViewContentScaleSupport` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -58,9 +58,9 @@ class YaPlugViewContentScaleSupport * Instantiate this instance with arguments read from another interface * implementation. */ - YaPlugViewContentScaleSupport(const ConstructArgs&& args); + YaPlugViewContentScaleSupport(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to diff --git a/src/common/serialization/vst3/plug-view/plug-view.cpp b/src/common/serialization/vst3/plug-view/plug-view.cpp index b9a9f8d8..208e5e32 100644 --- a/src/common/serialization/vst3/plug-view/plug-view.cpp +++ b/src/common/serialization/vst3/plug-view/plug-view.cpp @@ -16,11 +16,11 @@ #include "plug-view.h" -YaPlugView::ConstructArgs::ConstructArgs() {} +YaPlugView::ConstructArgs::ConstructArgs() noexcept {} YaPlugView::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported(Steinberg::FUnknownPtr(object)) {} -YaPlugView::YaPlugView(const ConstructArgs&& args) +YaPlugView::YaPlugView(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plug-view/plug-view.h b/src/common/serialization/vst3/plug-view/plug-view.h index d3a94d41..25909ce8 100644 --- a/src/common/serialization/vst3/plug-view/plug-view.h +++ b/src/common/serialization/vst3/plug-view/plug-view.h @@ -36,13 +36,13 @@ class YaPlugView : public Steinberg::IPlugView { * These are the arguments for creating a `YaPlugView`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements `IPlugView` and * read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -59,9 +59,9 @@ class YaPlugView : public Steinberg::IPlugView { * Instantiate this instance with arguments read from another interface * implementation. */ - YaPlugView(const ConstructArgs&& args); + YaPlugView(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to diff --git a/src/common/serialization/vst3/plugin-factory-proxy.cpp b/src/common/serialization/vst3/plugin-factory-proxy.cpp index 116ea685..384a60dd 100644 --- a/src/common/serialization/vst3/plugin-factory-proxy.cpp +++ b/src/common/serialization/vst3/plugin-factory-proxy.cpp @@ -16,18 +16,19 @@ #include "plugin-factory-proxy.h" -Vst3PluginFactoryProxy::ConstructArgs::ConstructArgs() {} +Vst3PluginFactoryProxy::ConstructArgs::ConstructArgs() noexcept {} Vst3PluginFactoryProxy::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : plugin_factory_args(object) {} -Vst3PluginFactoryProxy::Vst3PluginFactoryProxy(const ConstructArgs&& args) +Vst3PluginFactoryProxy::Vst3PluginFactoryProxy( + const ConstructArgs&& args) noexcept : YaPluginFactory3(std::move(args.plugin_factory_args)), arguments(std::move(args)){FUNKNOWN_CTOR} // clang-format just doesn't understand these macros, I guess - Vst3PluginFactoryProxy::~Vst3PluginFactoryProxy() { + Vst3PluginFactoryProxy::~Vst3PluginFactoryProxy() noexcept { FUNKNOWN_DTOR } diff --git a/src/common/serialization/vst3/plugin-factory-proxy.h b/src/common/serialization/vst3/plugin-factory-proxy.h index 804befa3..4a8b9c6c 100644 --- a/src/common/serialization/vst3/plugin-factory-proxy.h +++ b/src/common/serialization/vst3/plugin-factory-proxy.h @@ -36,13 +36,13 @@ class Vst3PluginFactoryProxy : public YaPluginFactory3 { * These are the arguments for constructing a `Vst3PluginFactoryProxyImpl`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Read from an existing object. We will try to mimic this object, so * we'll support any interfaces this object also supports. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; YaPluginFactory3::ConstructArgs plugin_factory_args; @@ -68,14 +68,14 @@ class Vst3PluginFactoryProxy : public YaPluginFactory3 { * factory. The is done once during startup and the plugin factory gets * reused for the lifetime of the module. */ - Vst3PluginFactoryProxy(const ConstructArgs&& args); + Vst3PluginFactoryProxy(const ConstructArgs&& args) noexcept; /** * We do not need special handling here since the Window VST3 plugin's * plugin factory will also be destroyed when we terminate the Wine plugin * host or unload the plugin there. */ - virtual ~Vst3PluginFactoryProxy(); + virtual ~Vst3PluginFactoryProxy() noexcept; DECLARE_FUNKNOWN_METHODS diff --git a/src/common/serialization/vst3/plugin-factory/plugin-factory.cpp b/src/common/serialization/vst3/plugin-factory/plugin-factory.cpp index ea3a0108..94a97ea9 100644 --- a/src/common/serialization/vst3/plugin-factory/plugin-factory.cpp +++ b/src/common/serialization/vst3/plugin-factory/plugin-factory.cpp @@ -21,7 +21,7 @@ #include -YaPluginFactory3::ConstructArgs::ConstructArgs() {} +YaPluginFactory3::ConstructArgs::ConstructArgs() noexcept {} YaPluginFactory3::ConstructArgs::ConstructArgs( Steinberg::IPtr object) { @@ -99,7 +99,7 @@ YaPluginFactory3::ConstructArgs::ConstructArgs( } } -YaPluginFactory3::YaPluginFactory3(const ConstructArgs&& args) +YaPluginFactory3::YaPluginFactory3(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} tresult PLUGIN_API diff --git a/src/common/serialization/vst3/plugin-factory/plugin-factory.h b/src/common/serialization/vst3/plugin-factory/plugin-factory.h index ceb3664f..219a0ca0 100644 --- a/src/common/serialization/vst3/plugin-factory/plugin-factory.h +++ b/src/common/serialization/vst3/plugin-factory/plugin-factory.h @@ -38,7 +38,7 @@ class YaPluginFactory3 : public Steinberg::IPluginFactory3 { * query them. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements @@ -122,17 +122,17 @@ class YaPluginFactory3 : public Steinberg::IPluginFactory3 { * Instantiate this instance with arguments read from the Windows VST3 * plugin's plugin factory. */ - YaPluginFactory3(const ConstructArgs&& args); + YaPluginFactory3(const ConstructArgs&& args) noexcept; - inline bool supports_plugin_factory() const { + inline bool supports_plugin_factory() const noexcept { return arguments.supports_plugin_factory; } - inline bool supports_plugin_factory_2() const { + inline bool supports_plugin_factory_2() const noexcept { return arguments.supports_plugin_factory_2; } - inline bool supports_plugin_factory_3() const { + inline bool supports_plugin_factory_3() const noexcept { return arguments.supports_plugin_factory_3; } diff --git a/src/common/serialization/vst3/plugin-proxy.cpp b/src/common/serialization/vst3/plugin-proxy.cpp index d9264c70..ce200931 100644 --- a/src/common/serialization/vst3/plugin-proxy.cpp +++ b/src/common/serialization/vst3/plugin-proxy.cpp @@ -16,11 +16,11 @@ #include "plugin-proxy.h" -Vst3PluginProxy::ConstructArgs::ConstructArgs() {} +Vst3PluginProxy::ConstructArgs::ConstructArgs() noexcept {} Vst3PluginProxy::ConstructArgs::ConstructArgs( Steinberg::IPtr object, - size_t instance_id) + size_t instance_id) noexcept : instance_id(instance_id), audio_presentation_latency_args(object), audio_processor_args(object), @@ -44,7 +44,7 @@ Vst3PluginProxy::ConstructArgs::ConstructArgs( unit_info_args(object), xml_representation_controller_args(object) {} -Vst3PluginProxy::Vst3PluginProxy(const ConstructArgs&& args) +Vst3PluginProxy::Vst3PluginProxy(const ConstructArgs&& args) noexcept : YaAudioPresentationLatency( std::move(args.audio_presentation_latency_args)), YaAudioProcessor(std::move(args.audio_processor_args)), @@ -75,7 +75,7 @@ Vst3PluginProxy::Vst3PluginProxy(const ConstructArgs&& args) std::move(args.xml_representation_controller_args)), arguments(std::move(args)){FUNKNOWN_CTOR} - Vst3PluginProxy::~Vst3PluginProxy() { + Vst3PluginProxy::~Vst3PluginProxy() noexcept { FUNKNOWN_DTOR } diff --git a/src/common/serialization/vst3/plugin-proxy.h b/src/common/serialization/vst3/plugin-proxy.h index be2f03f3..84ac2512 100644 --- a/src/common/serialization/vst3/plugin-proxy.h +++ b/src/common/serialization/vst3/plugin-proxy.h @@ -95,13 +95,13 @@ class Vst3PluginProxy : public YaAudioPresentationLatency, * These are the arguments for constructing a `Vst3PluginProxyImpl`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Read from an existing object. We will try to mimic this object, so * we'll support any interfaces this object also supports. */ - ConstructArgs(Steinberg::IPtr object, size_t instance_id); + ConstructArgs(Steinberg::IPtr object, size_t instance_id) noexcept; /** * The unique identifier for this specific object instance. @@ -198,7 +198,7 @@ class Vst3PluginProxy : public YaAudioPresentationLatency, * Instantiate this object instance with arguments read from another * interface implementation. */ - Vst3PluginProxy(const ConstructArgs&& args); + Vst3PluginProxy(const ConstructArgs&& args) noexcept; /** * Message to request the Wine plugin host to destroy this object instance @@ -221,7 +221,7 @@ class Vst3PluginProxy : public YaAudioPresentationLatency, * @remark The plugin side implementation should send a control message to * clean up the instance on the Wine side in its destructor. */ - virtual ~Vst3PluginProxy() = 0; + virtual ~Vst3PluginProxy() noexcept = 0; DECLARE_FUNKNOWN_METHODS @@ -229,7 +229,7 @@ class Vst3PluginProxy : public YaAudioPresentationLatency, * Get this object's instance ID. Used in `IConnectionPoint` to identify and * connect specific objects. */ - inline size_t instance_id() const { return arguments.instance_id; } + inline size_t instance_id() const noexcept { return arguments.instance_id; } // We'll define messages for functions that have identical definitions in // multiple interfaces below. When the Wine plugin host process handles diff --git a/src/common/serialization/vst3/plugin/audio-presentation-latency.cpp b/src/common/serialization/vst3/plugin/audio-presentation-latency.cpp index 2a4f23c6..3b38424e 100644 --- a/src/common/serialization/vst3/plugin/audio-presentation-latency.cpp +++ b/src/common/serialization/vst3/plugin/audio-presentation-latency.cpp @@ -16,14 +16,14 @@ #include "audio-presentation-latency.h" -YaAudioPresentationLatency::ConstructArgs::ConstructArgs() {} +YaAudioPresentationLatency::ConstructArgs::ConstructArgs() noexcept {} YaAudioPresentationLatency::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported( Steinberg::FUnknownPtr( object)) {} YaAudioPresentationLatency::YaAudioPresentationLatency( - const ConstructArgs&& args) + const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/audio-presentation-latency.h b/src/common/serialization/vst3/plugin/audio-presentation-latency.h index e0e84dfd..251430a8 100644 --- a/src/common/serialization/vst3/plugin/audio-presentation-latency.h +++ b/src/common/serialization/vst3/plugin/audio-presentation-latency.h @@ -35,13 +35,13 @@ class YaAudioPresentationLatency * These are the arguments for creating a `YaAudioPresentationLatency`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `IAudioPresentationLatency` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -58,9 +58,9 @@ class YaAudioPresentationLatency * Instantiate this instance with arguments read from another interface * implementation. */ - YaAudioPresentationLatency(const ConstructArgs&& args); + YaAudioPresentationLatency(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to diff --git a/src/common/serialization/vst3/plugin/audio-processor.cpp b/src/common/serialization/vst3/plugin/audio-processor.cpp index 62472a14..50a7b686 100644 --- a/src/common/serialization/vst3/plugin/audio-processor.cpp +++ b/src/common/serialization/vst3/plugin/audio-processor.cpp @@ -16,12 +16,12 @@ #include "audio-processor.h" -YaAudioProcessor::ConstructArgs::ConstructArgs() {} +YaAudioProcessor::ConstructArgs::ConstructArgs() noexcept {} YaAudioProcessor::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported( Steinberg::FUnknownPtr(object)) {} -YaAudioProcessor::YaAudioProcessor(const ConstructArgs&& args) +YaAudioProcessor::YaAudioProcessor(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/audio-processor.h b/src/common/serialization/vst3/plugin/audio-processor.h index 75a909d6..4e32107f 100644 --- a/src/common/serialization/vst3/plugin/audio-processor.h +++ b/src/common/serialization/vst3/plugin/audio-processor.h @@ -36,13 +36,13 @@ class YaAudioProcessor : public Steinberg::Vst::IAudioProcessor { * These are the arguments for creating a `YaAudioProcessor`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements `IAudioProcessor` * and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -59,9 +59,9 @@ class YaAudioProcessor : public Steinberg::Vst::IAudioProcessor { * Instantiate this instance with arguments read from another interface * implementation. */ - YaAudioProcessor(const ConstructArgs&& args); + YaAudioProcessor(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to diff --git a/src/common/serialization/vst3/plugin/automation-state.cpp b/src/common/serialization/vst3/plugin/automation-state.cpp index 1d1077b3..6bd9cc83 100644 --- a/src/common/serialization/vst3/plugin/automation-state.cpp +++ b/src/common/serialization/vst3/plugin/automation-state.cpp @@ -16,12 +16,12 @@ #include "automation-state.h" -YaAutomationState::ConstructArgs::ConstructArgs() {} +YaAutomationState::ConstructArgs::ConstructArgs() noexcept {} YaAutomationState::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported( Steinberg::FUnknownPtr(object)) {} -YaAutomationState::YaAutomationState(const ConstructArgs&& args) +YaAutomationState::YaAutomationState(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/automation-state.h b/src/common/serialization/vst3/plugin/automation-state.h index 9bb4bf3f..c42b99b3 100644 --- a/src/common/serialization/vst3/plugin/automation-state.h +++ b/src/common/serialization/vst3/plugin/automation-state.h @@ -37,13 +37,13 @@ class YaAutomationState : public Steinberg::Vst::IAutomationState { * These are the arguments for creating a `YaAutomationState`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `IAutomationState` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -60,9 +60,9 @@ class YaAutomationState : public Steinberg::Vst::IAutomationState { * Instantiate this instance with arguments read from another interface * implementation. */ - YaAutomationState(const ConstructArgs&& args); + YaAutomationState(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to diff --git a/src/common/serialization/vst3/plugin/component.cpp b/src/common/serialization/vst3/plugin/component.cpp index 932721e0..00379d50 100644 --- a/src/common/serialization/vst3/plugin/component.cpp +++ b/src/common/serialization/vst3/plugin/component.cpp @@ -16,11 +16,11 @@ #include "component.h" -YaComponent::ConstructArgs::ConstructArgs() {} +YaComponent::ConstructArgs::ConstructArgs() noexcept {} YaComponent::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported(Steinberg::FUnknownPtr(object)) {} -YaComponent::YaComponent(const ConstructArgs&& args) +YaComponent::YaComponent(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/component.h b/src/common/serialization/vst3/plugin/component.h index a6a5f121..087bfa85 100644 --- a/src/common/serialization/vst3/plugin/component.h +++ b/src/common/serialization/vst3/plugin/component.h @@ -37,13 +37,13 @@ class YaComponent : public Steinberg::Vst::IComponent { * These are the arguments for creating a `YaComponent`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements `IComponent` and * read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -60,9 +60,9 @@ class YaComponent : public Steinberg::Vst::IComponent { * Instantiate this instance with arguments read from another interface * implementation. */ - YaComponent(const ConstructArgs&& args); + YaComponent(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * The response code and returned CID for a call to diff --git a/src/common/serialization/vst3/plugin/connection-point.cpp b/src/common/serialization/vst3/plugin/connection-point.cpp index 1203f718..31be3247 100644 --- a/src/common/serialization/vst3/plugin/connection-point.cpp +++ b/src/common/serialization/vst3/plugin/connection-point.cpp @@ -16,21 +16,21 @@ #include "connection-point.h" -YaConnectionPoint::ConstructArgs::ConstructArgs() {} +YaConnectionPoint::ConstructArgs::ConstructArgs() noexcept {} YaConnectionPoint::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported( Steinberg::FUnknownPtr(object)) {} YaConnectionPoint::Vst3ConnectionPointProxyConstructArgs:: - Vst3ConnectionPointProxyConstructArgs() {} + Vst3ConnectionPointProxyConstructArgs() noexcept {} YaConnectionPoint::Vst3ConnectionPointProxyConstructArgs:: Vst3ConnectionPointProxyConstructArgs( Steinberg::IPtr object, - size_t owner_instance_id) + size_t owner_instance_id) noexcept : owner_instance_id(owner_instance_id), connection_point_args(object) {} -YaConnectionPoint::YaConnectionPoint(const ConstructArgs&& args) +YaConnectionPoint::YaConnectionPoint(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/connection-point.h b/src/common/serialization/vst3/plugin/connection-point.h index 8371ceac..d8e9153e 100644 --- a/src/common/serialization/vst3/plugin/connection-point.h +++ b/src/common/serialization/vst3/plugin/connection-point.h @@ -42,13 +42,13 @@ class YaConnectionPoint : public Steinberg::Vst::IConnectionPoint { * These are the arguments for creating a `YaConnectionPoint`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `IConnectionPoint` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -69,7 +69,7 @@ class YaConnectionPoint : public Steinberg::Vst::IConnectionPoint { * It's defined here to work around circular includes. */ struct Vst3ConnectionPointProxyConstructArgs { - Vst3ConnectionPointProxyConstructArgs(); + Vst3ConnectionPointProxyConstructArgs() noexcept; /** * Read from an existing object. We will try to mimic this object, so @@ -80,7 +80,7 @@ class YaConnectionPoint : public Steinberg::Vst::IConnectionPoint { * here. */ Vst3ConnectionPointProxyConstructArgs(Steinberg::IPtr object, - size_t owner_instance_id); + size_t owner_instance_id) noexcept; /** * The unique instance identifier of the proxy object instance this @@ -104,9 +104,9 @@ class YaConnectionPoint : public Steinberg::Vst::IConnectionPoint { * Instantiate this instance with arguments read from another interface * implementation. */ - YaConnectionPoint(const ConstructArgs&& args); + YaConnectionPoint(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to `IConnectionPoint::connect(other)` to diff --git a/src/common/serialization/vst3/plugin/edit-controller-2.cpp b/src/common/serialization/vst3/plugin/edit-controller-2.cpp index aaeb38a9..9f8bbe90 100644 --- a/src/common/serialization/vst3/plugin/edit-controller-2.cpp +++ b/src/common/serialization/vst3/plugin/edit-controller-2.cpp @@ -16,12 +16,12 @@ #include "edit-controller-2.h" -YaEditController2::ConstructArgs::ConstructArgs() {} +YaEditController2::ConstructArgs::ConstructArgs() noexcept {} YaEditController2::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported( Steinberg::FUnknownPtr(object)) {} -YaEditController2::YaEditController2(const ConstructArgs&& args) +YaEditController2::YaEditController2(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/edit-controller-2.h b/src/common/serialization/vst3/plugin/edit-controller-2.h index 9c5c417e..24b615c6 100644 --- a/src/common/serialization/vst3/plugin/edit-controller-2.h +++ b/src/common/serialization/vst3/plugin/edit-controller-2.h @@ -34,13 +34,13 @@ class YaEditController2 : public Steinberg::Vst::IEditController2 { * These are the arguments for creating a `YaEditController2`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `IEditController2` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -57,9 +57,9 @@ class YaEditController2 : public Steinberg::Vst::IEditController2 { * Instantiate this instance with arguments read from another interface * implementation. */ - YaEditController2(const ConstructArgs&& args); + YaEditController2(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to `IEditController2::setKnobMode(mode)` diff --git a/src/common/serialization/vst3/plugin/edit-controller-host-editing.cpp b/src/common/serialization/vst3/plugin/edit-controller-host-editing.cpp index a6ba068a..89869518 100644 --- a/src/common/serialization/vst3/plugin/edit-controller-host-editing.cpp +++ b/src/common/serialization/vst3/plugin/edit-controller-host-editing.cpp @@ -16,14 +16,14 @@ #include "edit-controller-host-editing.h" -YaEditControllerHostEditing::ConstructArgs::ConstructArgs() {} +YaEditControllerHostEditing::ConstructArgs::ConstructArgs() noexcept {} YaEditControllerHostEditing::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported( Steinberg::FUnknownPtr( object)) {} YaEditControllerHostEditing::YaEditControllerHostEditing( - const ConstructArgs&& args) + const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/edit-controller-host-editing.h b/src/common/serialization/vst3/plugin/edit-controller-host-editing.h index 585a8985..4c9defaf 100644 --- a/src/common/serialization/vst3/plugin/edit-controller-host-editing.h +++ b/src/common/serialization/vst3/plugin/edit-controller-host-editing.h @@ -35,13 +35,13 @@ class YaEditControllerHostEditing * These are the arguments for creating a `YaEditControllerHostEditing`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `IEditControllerHostEditing` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -58,9 +58,9 @@ class YaEditControllerHostEditing * Instantiate this instance with arguments read from another interface * implementation. */ - YaEditControllerHostEditing(const ConstructArgs&& args); + YaEditControllerHostEditing(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to diff --git a/src/common/serialization/vst3/plugin/edit-controller.cpp b/src/common/serialization/vst3/plugin/edit-controller.cpp index e617fef3..bf42f606 100644 --- a/src/common/serialization/vst3/plugin/edit-controller.cpp +++ b/src/common/serialization/vst3/plugin/edit-controller.cpp @@ -16,12 +16,12 @@ #include "edit-controller.h" -YaEditController::ConstructArgs::ConstructArgs() {} +YaEditController::ConstructArgs::ConstructArgs() noexcept {} YaEditController::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported( Steinberg::FUnknownPtr(object)) {} -YaEditController::YaEditController(const ConstructArgs&& args) +YaEditController::YaEditController(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/edit-controller.h b/src/common/serialization/vst3/plugin/edit-controller.h index 628766ed..616a844b 100644 --- a/src/common/serialization/vst3/plugin/edit-controller.h +++ b/src/common/serialization/vst3/plugin/edit-controller.h @@ -38,13 +38,13 @@ class YaEditController : public Steinberg::Vst::IEditController { * These are the arguments for creating a `YaEditController`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `IEditController` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -61,9 +61,9 @@ class YaEditController : public Steinberg::Vst::IEditController { * Instantiate this instance with arguments read from another interface * implementation. */ - YaEditController(const ConstructArgs&& args); + YaEditController(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to diff --git a/src/common/serialization/vst3/plugin/info-listener.cpp b/src/common/serialization/vst3/plugin/info-listener.cpp index 22746c7f..4edcb2bd 100644 --- a/src/common/serialization/vst3/plugin/info-listener.cpp +++ b/src/common/serialization/vst3/plugin/info-listener.cpp @@ -16,13 +16,13 @@ #include "info-listener.h" -YaInfoListener::ConstructArgs::ConstructArgs() {} +YaInfoListener::ConstructArgs::ConstructArgs() noexcept {} YaInfoListener::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported( Steinberg::FUnknownPtr( object)) {} -YaInfoListener::YaInfoListener(const ConstructArgs&& args) +YaInfoListener::YaInfoListener(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/info-listener.h b/src/common/serialization/vst3/plugin/info-listener.h index fc6fdba9..66daba8a 100644 --- a/src/common/serialization/vst3/plugin/info-listener.h +++ b/src/common/serialization/vst3/plugin/info-listener.h @@ -35,13 +35,13 @@ class YaInfoListener : public Steinberg::Vst::ChannelContext::IInfoListener { * These are the arguments for creating a `YaInfoListener`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements `IInfoListener` * and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -58,9 +58,9 @@ class YaInfoListener : public Steinberg::Vst::ChannelContext::IInfoListener { * Instantiate this instance with arguments read from another interface * implementation. */ - YaInfoListener(const ConstructArgs&& args); + YaInfoListener(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to diff --git a/src/common/serialization/vst3/plugin/keyswitch-controller.cpp b/src/common/serialization/vst3/plugin/keyswitch-controller.cpp index 68cfbfd5..7478c6e5 100644 --- a/src/common/serialization/vst3/plugin/keyswitch-controller.cpp +++ b/src/common/serialization/vst3/plugin/keyswitch-controller.cpp @@ -16,12 +16,12 @@ #include "keyswitch-controller.h" -YaKeyswitchController::ConstructArgs::ConstructArgs() {} +YaKeyswitchController::ConstructArgs::ConstructArgs() noexcept {} YaKeyswitchController::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported(Steinberg::FUnknownPtr( object)) {} -YaKeyswitchController::YaKeyswitchController(const ConstructArgs&& args) +YaKeyswitchController::YaKeyswitchController(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/keyswitch-controller.h b/src/common/serialization/vst3/plugin/keyswitch-controller.h index 5217aeaa..8dc54090 100644 --- a/src/common/serialization/vst3/plugin/keyswitch-controller.h +++ b/src/common/serialization/vst3/plugin/keyswitch-controller.h @@ -34,13 +34,13 @@ class YaKeyswitchController : public Steinberg::Vst::IKeyswitchController { * These are the arguments for creating a `YaKeyswitchController`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `IKeyswitchController` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -57,9 +57,9 @@ class YaKeyswitchController : public Steinberg::Vst::IKeyswitchController { * Instantiate this instance with arguments read from another interface * implementation. */ - YaKeyswitchController(const ConstructArgs&& args); + YaKeyswitchController(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to diff --git a/src/common/serialization/vst3/plugin/midi-learn.cpp b/src/common/serialization/vst3/plugin/midi-learn.cpp index 660ebff9..d9be78e6 100644 --- a/src/common/serialization/vst3/plugin/midi-learn.cpp +++ b/src/common/serialization/vst3/plugin/midi-learn.cpp @@ -16,11 +16,11 @@ #include "midi-learn.h" -YaMidiLearn::ConstructArgs::ConstructArgs() {} +YaMidiLearn::ConstructArgs::ConstructArgs() noexcept {} YaMidiLearn::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported(Steinberg::FUnknownPtr(object)) {} -YaMidiLearn::YaMidiLearn(const ConstructArgs&& args) +YaMidiLearn::YaMidiLearn(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/midi-learn.h b/src/common/serialization/vst3/plugin/midi-learn.h index f64130ef..f70e9823 100644 --- a/src/common/serialization/vst3/plugin/midi-learn.h +++ b/src/common/serialization/vst3/plugin/midi-learn.h @@ -34,13 +34,13 @@ class YaMidiLearn : public Steinberg::Vst::IMidiLearn { * These are the arguments for creating a `YaMidiLearn`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements `IMidiLearn` * and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -57,9 +57,9 @@ class YaMidiLearn : public Steinberg::Vst::IMidiLearn { * Instantiate this instance with arguments read from another interface * implementation. */ - YaMidiLearn(const ConstructArgs&& args); + YaMidiLearn(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to diff --git a/src/common/serialization/vst3/plugin/midi-mapping.cpp b/src/common/serialization/vst3/plugin/midi-mapping.cpp index 95fc998b..3f2ec861 100644 --- a/src/common/serialization/vst3/plugin/midi-mapping.cpp +++ b/src/common/serialization/vst3/plugin/midi-mapping.cpp @@ -16,11 +16,11 @@ #include "midi-mapping.h" -YaMidiMapping::ConstructArgs::ConstructArgs() {} +YaMidiMapping::ConstructArgs::ConstructArgs() noexcept {} YaMidiMapping::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported(Steinberg::FUnknownPtr(object)) {} -YaMidiMapping::YaMidiMapping(const ConstructArgs&& args) +YaMidiMapping::YaMidiMapping(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/midi-mapping.h b/src/common/serialization/vst3/plugin/midi-mapping.h index ec9a2ceb..b9d5e518 100644 --- a/src/common/serialization/vst3/plugin/midi-mapping.h +++ b/src/common/serialization/vst3/plugin/midi-mapping.h @@ -34,13 +34,13 @@ class YaMidiMapping : public Steinberg::Vst::IMidiMapping { * These are the arguments for creating a `YaMidiMapping`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements `IMidiMapping` * and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -57,9 +57,9 @@ class YaMidiMapping : public Steinberg::Vst::IMidiMapping { * Instantiate this instance with arguments read from another interface * implementation. */ - YaMidiMapping(const ConstructArgs&& args); + YaMidiMapping(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * The response code and returned parameter ID for a call to diff --git a/src/common/serialization/vst3/plugin/note-expression-controller.cpp b/src/common/serialization/vst3/plugin/note-expression-controller.cpp index f127964c..d5731f53 100644 --- a/src/common/serialization/vst3/plugin/note-expression-controller.cpp +++ b/src/common/serialization/vst3/plugin/note-expression-controller.cpp @@ -16,14 +16,14 @@ #include "note-expression-controller.h" -YaNoteExpressionController::ConstructArgs::ConstructArgs() {} +YaNoteExpressionController::ConstructArgs::ConstructArgs() noexcept {} YaNoteExpressionController::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported( Steinberg::FUnknownPtr( object)) {} YaNoteExpressionController::YaNoteExpressionController( - const ConstructArgs&& args) + const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/note-expression-controller.h b/src/common/serialization/vst3/plugin/note-expression-controller.h index 8ed43d29..60bd130c 100644 --- a/src/common/serialization/vst3/plugin/note-expression-controller.h +++ b/src/common/serialization/vst3/plugin/note-expression-controller.h @@ -38,13 +38,13 @@ class YaNoteExpressionController * These are the arguments for creating a `YaNoteExpressionController`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `INoteExpressionController` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -61,9 +61,9 @@ class YaNoteExpressionController * Instantiate this instance with arguments read from another interface * implementation. */ - YaNoteExpressionController(const ConstructArgs&& args); + YaNoteExpressionController(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to diff --git a/src/common/serialization/vst3/plugin/note-expression-physical-ui-mapping.cpp b/src/common/serialization/vst3/plugin/note-expression-physical-ui-mapping.cpp index 81373669..93527230 100644 --- a/src/common/serialization/vst3/plugin/note-expression-physical-ui-mapping.cpp +++ b/src/common/serialization/vst3/plugin/note-expression-physical-ui-mapping.cpp @@ -16,13 +16,13 @@ #include "note-expression-physical-ui-mapping.h" -YaNoteExpressionPhysicalUIMapping::ConstructArgs::ConstructArgs() {} +YaNoteExpressionPhysicalUIMapping::ConstructArgs::ConstructArgs() noexcept {} YaNoteExpressionPhysicalUIMapping::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported(Steinberg::FUnknownPtr< Steinberg::Vst::INoteExpressionPhysicalUIMapping>(object)) {} YaNoteExpressionPhysicalUIMapping::YaNoteExpressionPhysicalUIMapping( - const ConstructArgs&& args) + const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/note-expression-physical-ui-mapping.h b/src/common/serialization/vst3/plugin/note-expression-physical-ui-mapping.h index 9992ad06..908ccbee 100644 --- a/src/common/serialization/vst3/plugin/note-expression-physical-ui-mapping.h +++ b/src/common/serialization/vst3/plugin/note-expression-physical-ui-mapping.h @@ -37,13 +37,13 @@ class YaNoteExpressionPhysicalUIMapping * `YaNoteExpressionPhysicalUIMapping`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `INoteExpressionPhysicalUIMapping` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -60,9 +60,9 @@ class YaNoteExpressionPhysicalUIMapping * Instantiate this instance with arguments read from another interface * implementation. */ - YaNoteExpressionPhysicalUIMapping(const ConstructArgs&& args); + YaNoteExpressionPhysicalUIMapping(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * The response code and returned info for a call to diff --git a/src/common/serialization/vst3/plugin/parameter-function-name.cpp b/src/common/serialization/vst3/plugin/parameter-function-name.cpp index 803d2d93..95ca8852 100644 --- a/src/common/serialization/vst3/plugin/parameter-function-name.cpp +++ b/src/common/serialization/vst3/plugin/parameter-function-name.cpp @@ -16,12 +16,12 @@ #include "parameter-function-name.h" -YaParameterFunctionName::ConstructArgs::ConstructArgs() {} +YaParameterFunctionName::ConstructArgs::ConstructArgs() noexcept {} YaParameterFunctionName::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported(Steinberg::FUnknownPtr( object)) {} -YaParameterFunctionName::YaParameterFunctionName(const ConstructArgs&& args) +YaParameterFunctionName::YaParameterFunctionName(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/parameter-function-name.h b/src/common/serialization/vst3/plugin/parameter-function-name.h index 0c161540..ae06960f 100644 --- a/src/common/serialization/vst3/plugin/parameter-function-name.h +++ b/src/common/serialization/vst3/plugin/parameter-function-name.h @@ -36,13 +36,13 @@ class YaParameterFunctionName : public Steinberg::Vst::IParameterFunctionName { * These are the arguments for creating a `YaParameterFunctionName`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `IParameterFunctionName` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -59,9 +59,9 @@ class YaParameterFunctionName : public Steinberg::Vst::IParameterFunctionName { * Instantiate this instance with arguments read from another interface * implementation. */ - YaParameterFunctionName(const ConstructArgs&& args); + YaParameterFunctionName(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * The response code and returned parameter ID for a call to diff --git a/src/common/serialization/vst3/plugin/plugin-base.cpp b/src/common/serialization/vst3/plugin/plugin-base.cpp index e646a70d..c33f547b 100644 --- a/src/common/serialization/vst3/plugin/plugin-base.cpp +++ b/src/common/serialization/vst3/plugin/plugin-base.cpp @@ -16,11 +16,11 @@ #include "plugin-base.h" -YaPluginBase::ConstructArgs::ConstructArgs() {} +YaPluginBase::ConstructArgs::ConstructArgs() noexcept {} YaPluginBase::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported(Steinberg::FUnknownPtr(object)) {} -YaPluginBase::YaPluginBase(const ConstructArgs&& args) +YaPluginBase::YaPluginBase(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/plugin-base.h b/src/common/serialization/vst3/plugin/plugin-base.h index 3b55e960..177b8b7b 100644 --- a/src/common/serialization/vst3/plugin/plugin-base.h +++ b/src/common/serialization/vst3/plugin/plugin-base.h @@ -36,13 +36,13 @@ class YaPluginBase : public Steinberg::IPluginBase { * These are the arguments for creating a `YaPluginBase`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements `IPluginBase` and * read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -59,9 +59,9 @@ class YaPluginBase : public Steinberg::IPluginBase { * Instantiate this instance with arguments read from another interface * implementation. */ - YaPluginBase(const ConstructArgs&& args); + YaPluginBase(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to `IPluginBase::initialize()` to the Wine diff --git a/src/common/serialization/vst3/plugin/prefetchable-support.cpp b/src/common/serialization/vst3/plugin/prefetchable-support.cpp index 5ee66a74..ddbe677b 100644 --- a/src/common/serialization/vst3/plugin/prefetchable-support.cpp +++ b/src/common/serialization/vst3/plugin/prefetchable-support.cpp @@ -16,12 +16,12 @@ #include "prefetchable-support.h" -YaPrefetchableSupport::ConstructArgs::ConstructArgs() {} +YaPrefetchableSupport::ConstructArgs::ConstructArgs() noexcept {} YaPrefetchableSupport::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported(Steinberg::FUnknownPtr( object)) {} -YaPrefetchableSupport::YaPrefetchableSupport(const ConstructArgs&& args) +YaPrefetchableSupport::YaPrefetchableSupport(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/prefetchable-support.h b/src/common/serialization/vst3/plugin/prefetchable-support.h index 92c4808b..7536489b 100644 --- a/src/common/serialization/vst3/plugin/prefetchable-support.h +++ b/src/common/serialization/vst3/plugin/prefetchable-support.h @@ -35,13 +35,13 @@ class YaPrefetchableSupport : public Steinberg::Vst::IPrefetchableSupport { * These are the arguments for creating a `YaPrefetchableSupport`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `IPrefetchableSupport` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -58,9 +58,9 @@ class YaPrefetchableSupport : public Steinberg::Vst::IPrefetchableSupport { * Instantiate this instance with arguments read from another interface * implementation. */ - YaPrefetchableSupport(const ConstructArgs&& args); + YaPrefetchableSupport(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * The response code and returned bus information for a call to diff --git a/src/common/serialization/vst3/plugin/process-context-requirements.cpp b/src/common/serialization/vst3/plugin/process-context-requirements.cpp index 27e19553..b6aba708 100644 --- a/src/common/serialization/vst3/plugin/process-context-requirements.cpp +++ b/src/common/serialization/vst3/plugin/process-context-requirements.cpp @@ -16,14 +16,14 @@ #include "process-context-requirements.h" -YaProcessContextRequirements::ConstructArgs::ConstructArgs() {} +YaProcessContextRequirements::ConstructArgs::ConstructArgs() noexcept {} YaProcessContextRequirements::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported( Steinberg::FUnknownPtr( object)) {} YaProcessContextRequirements::YaProcessContextRequirements( - const ConstructArgs&& args) + const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/process-context-requirements.h b/src/common/serialization/vst3/plugin/process-context-requirements.h index 906720e7..d3bf8737 100644 --- a/src/common/serialization/vst3/plugin/process-context-requirements.h +++ b/src/common/serialization/vst3/plugin/process-context-requirements.h @@ -37,13 +37,13 @@ class YaProcessContextRequirements * These are the arguments for creating a `YaProcessContextRequirements`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `IProcessContextRequirements` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -60,9 +60,9 @@ class YaProcessContextRequirements * Instantiate this instance with arguments read from another interface * implementation. */ - YaProcessContextRequirements(const ConstructArgs&& args); + YaProcessContextRequirements(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to diff --git a/src/common/serialization/vst3/plugin/program-list-data.cpp b/src/common/serialization/vst3/plugin/program-list-data.cpp index 69eb38b3..8c9159d8 100644 --- a/src/common/serialization/vst3/plugin/program-list-data.cpp +++ b/src/common/serialization/vst3/plugin/program-list-data.cpp @@ -16,12 +16,12 @@ #include "program-list-data.h" -YaProgramListData::ConstructArgs::ConstructArgs() {} +YaProgramListData::ConstructArgs::ConstructArgs() noexcept {} YaProgramListData::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported( Steinberg::FUnknownPtr(object)) {} -YaProgramListData::YaProgramListData(const ConstructArgs&& args) +YaProgramListData::YaProgramListData(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/program-list-data.h b/src/common/serialization/vst3/plugin/program-list-data.h index bf64ffc1..d6a7f577 100644 --- a/src/common/serialization/vst3/plugin/program-list-data.h +++ b/src/common/serialization/vst3/plugin/program-list-data.h @@ -35,13 +35,13 @@ class YaProgramListData : public Steinberg::Vst::IProgramListData { * These are the arguments for creating a `YaProgramListData`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `IProgramListData` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -58,9 +58,9 @@ class YaProgramListData : public Steinberg::Vst::IProgramListData { * Instantiate this instance with arguments read from another interface * implementation. */ - YaProgramListData(const ConstructArgs&& args); + YaProgramListData(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to diff --git a/src/common/serialization/vst3/plugin/unit-data.cpp b/src/common/serialization/vst3/plugin/unit-data.cpp index f6a3aabc..26bc73c9 100644 --- a/src/common/serialization/vst3/plugin/unit-data.cpp +++ b/src/common/serialization/vst3/plugin/unit-data.cpp @@ -16,12 +16,12 @@ #include "unit-data.h" -YaUnitData::ConstructArgs::ConstructArgs() {} +YaUnitData::ConstructArgs::ConstructArgs() noexcept {} YaUnitData::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported( Steinberg::FUnknownPtr(object)) {} -YaUnitData::YaUnitData(const ConstructArgs&& args) +YaUnitData::YaUnitData(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/unit-data.h b/src/common/serialization/vst3/plugin/unit-data.h index 1508eca2..1e81af65 100644 --- a/src/common/serialization/vst3/plugin/unit-data.h +++ b/src/common/serialization/vst3/plugin/unit-data.h @@ -35,13 +35,13 @@ class YaUnitData : public Steinberg::Vst::IUnitData { * These are the arguments for creating a `YaUnitData`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements `IUnitData` and * read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -58,9 +58,9 @@ class YaUnitData : public Steinberg::Vst::IUnitData { * Instantiate this instance with arguments read from another interface * implementation. */ - YaUnitData(const ConstructArgs&& args); + YaUnitData(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to `IUnitData::unitDataSupported(unit_id)` diff --git a/src/common/serialization/vst3/plugin/unit-info.cpp b/src/common/serialization/vst3/plugin/unit-info.cpp index 933767d5..a5e23167 100644 --- a/src/common/serialization/vst3/plugin/unit-info.cpp +++ b/src/common/serialization/vst3/plugin/unit-info.cpp @@ -16,11 +16,11 @@ #include "unit-info.h" -YaUnitInfo::ConstructArgs::ConstructArgs() {} +YaUnitInfo::ConstructArgs::ConstructArgs() noexcept {} YaUnitInfo::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported(Steinberg::FUnknownPtr(object)) {} -YaUnitInfo::YaUnitInfo(const ConstructArgs&& args) +YaUnitInfo::YaUnitInfo(const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/unit-info.h b/src/common/serialization/vst3/plugin/unit-info.h index a6223cde..47f357b8 100644 --- a/src/common/serialization/vst3/plugin/unit-info.h +++ b/src/common/serialization/vst3/plugin/unit-info.h @@ -35,13 +35,13 @@ class YaUnitInfo : public Steinberg::Vst::IUnitInfo { * These are the arguments for creating a `YaUnitInfo`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements `IUnitInfo` and * read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -58,9 +58,9 @@ class YaUnitInfo : public Steinberg::Vst::IUnitInfo { * Instantiate this instance with arguments read from another interface * implementation. */ - YaUnitInfo(const ConstructArgs&& args); + YaUnitInfo(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * Message to pass through a call to `IUnitInfo::getUnitCount()` to the Wine diff --git a/src/common/serialization/vst3/plugin/xml-representation-controller.cpp b/src/common/serialization/vst3/plugin/xml-representation-controller.cpp index abb4b2d6..4f5144d2 100644 --- a/src/common/serialization/vst3/plugin/xml-representation-controller.cpp +++ b/src/common/serialization/vst3/plugin/xml-representation-controller.cpp @@ -16,14 +16,14 @@ #include "xml-representation-controller.h" -YaXmlRepresentationController::ConstructArgs::ConstructArgs() {} +YaXmlRepresentationController::ConstructArgs::ConstructArgs() noexcept {} YaXmlRepresentationController::ConstructArgs::ConstructArgs( - Steinberg::IPtr object) + Steinberg::IPtr object) noexcept : supported( Steinberg::FUnknownPtr( object)) {} YaXmlRepresentationController::YaXmlRepresentationController( - const ConstructArgs&& args) + const ConstructArgs&& args) noexcept : arguments(std::move(args)) {} diff --git a/src/common/serialization/vst3/plugin/xml-representation-controller.h b/src/common/serialization/vst3/plugin/xml-representation-controller.h index 5af86c54..5d94da58 100644 --- a/src/common/serialization/vst3/plugin/xml-representation-controller.h +++ b/src/common/serialization/vst3/plugin/xml-representation-controller.h @@ -42,13 +42,13 @@ class YaXmlRepresentationController * These are the arguments for creating a `YaXmlRepresentationController`. */ struct ConstructArgs { - ConstructArgs(); + ConstructArgs() noexcept; /** * Check whether an existing implementation implements * `IXmlRepresentationController` and read arguments from it. */ - ConstructArgs(Steinberg::IPtr object); + ConstructArgs(Steinberg::IPtr object) noexcept; /** * Whether the object supported this interface. @@ -65,9 +65,9 @@ class YaXmlRepresentationController * Instantiate this instance with arguments read from another interface * implementation. */ - YaXmlRepresentationController(const ConstructArgs&& args); + YaXmlRepresentationController(const ConstructArgs&& args) noexcept; - inline bool supported() const { return arguments.supported; } + inline bool supported() const noexcept { return arguments.supported; } /** * The response code and written state for a call to diff --git a/src/common/serialization/vst3/process-data.cpp b/src/common/serialization/vst3/process-data.cpp index 1f634347..899ac59e 100644 --- a/src/common/serialization/vst3/process-data.cpp +++ b/src/common/serialization/vst3/process-data.cpp @@ -18,7 +18,7 @@ #include "src/common/utils.h" -YaAudioBusBuffers::YaAudioBusBuffers() {} +YaAudioBusBuffers::YaAudioBusBuffers() noexcept {} void YaAudioBusBuffers::clear(int32 sample_size, size_t num_samples, @@ -151,7 +151,7 @@ void YaAudioBusBuffers::write_back_outputs( buffers); } -YaProcessData::YaProcessData() +YaProcessData::YaProcessData() noexcept // This response object acts as an optimization. It stores pointers to the // original fields in our objects, so we can both only serialize those // fields when sending the response from the Wine side. This lets us avoid @@ -290,7 +290,7 @@ Steinberg::Vst::ProcessData& YaProcessData::reconstruct() { return reconstructed_process_data; } -YaProcessData::Response& YaProcessData::create_response() { +YaProcessData::Response& YaProcessData::create_response() noexcept { // NOTE: We _have_ to manually copy over the silence flags from the // `ProcessData` object generated in `get()` here sicne these of // course are not references or pointers like all other fields, so diff --git a/src/common/serialization/vst3/process-data.h b/src/common/serialization/vst3/process-data.h index 56fa2b85..4988369d 100644 --- a/src/common/serialization/vst3/process-data.h +++ b/src/common/serialization/vst3/process-data.h @@ -43,7 +43,7 @@ class YaAudioBusBuffers { * existing object with new audio data every processing cycle to avoid * reallocating a new object every time. */ - YaAudioBusBuffers(); + YaAudioBusBuffers() noexcept; /** * Create a new, zero initialize audio bus buffers object. Used to @@ -148,7 +148,7 @@ class YaProcessData { * because we need to fill the existing object with new data every * processing cycle to avoid reallocating a new object every time. */ - YaProcessData(); + YaProcessData() noexcept; /** * Copy data from a host provided `ProcessData` object during a process @@ -214,7 +214,7 @@ class YaProcessData { * **must** be received into, since we're deserializing directly into some * pointers. */ - Response& create_response(); + Response& create_response() noexcept; /** * Write all of this output data back to the host's `ProcessData` object. diff --git a/src/common/utils.cpp b/src/common/utils.cpp index 09b187e6..91e31544 100644 --- a/src/common/utils.cpp +++ b/src/common/utils.cpp @@ -32,7 +32,7 @@ fs::path get_temporary_directory() { } } -std::optional get_realtime_priority() { +std::optional get_realtime_priority() noexcept { sched_param current_params{}; if (sched_getparam(0, ¤t_params) == 0 && current_params.sched_priority > 0) { @@ -42,7 +42,7 @@ std::optional get_realtime_priority() { } } -bool set_realtime_priority(bool sched_fifo, int priority) { +bool set_realtime_priority(bool sched_fifo, int priority) noexcept { sched_param params{.sched_priority = (sched_fifo ? priority : 0)}; return sched_setscheduler(0, sched_fifo ? SCHED_FIFO : SCHED_OTHER, ¶ms) == 0; @@ -66,23 +66,24 @@ bool pid_running(pid_t pid) { } } -ScopedFlushToZero::ScopedFlushToZero() { +ScopedFlushToZero::ScopedFlushToZero() noexcept { old_ftz_mode = _MM_GET_FLUSH_ZERO_MODE(); _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); } -ScopedFlushToZero::~ScopedFlushToZero() { +ScopedFlushToZero::~ScopedFlushToZero() noexcept { if (old_ftz_mode) { _MM_SET_FLUSH_ZERO_MODE(*old_ftz_mode); } } -ScopedFlushToZero::ScopedFlushToZero(ScopedFlushToZero&& o) +ScopedFlushToZero::ScopedFlushToZero(ScopedFlushToZero&& o) noexcept : old_ftz_mode(std::move(o.old_ftz_mode)) { o.old_ftz_mode.reset(); } -ScopedFlushToZero& ScopedFlushToZero::operator=(ScopedFlushToZero&& o) { +ScopedFlushToZero& ScopedFlushToZero::operator=( + ScopedFlushToZero&& o) noexcept { old_ftz_mode = std::move(o.old_ftz_mode); o.old_ftz_mode.reset(); diff --git a/src/common/utils.h b/src/common/utils.h index 6368d450..9ac1e12c 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -65,7 +65,7 @@ boost::filesystem::path get_temporary_directory(); * `SCHED_FIFO`. Returns a nullopt of the calling thread is not under realtime * scheduling. */ -std::optional get_realtime_priority(); +std::optional get_realtime_priority() noexcept; /** * Set the scheduling policy to `SCHED_FIFO` with priority 5 for this process. @@ -82,7 +82,7 @@ std::optional get_realtime_priority(); * @return Whether the operation was successful or not. This will fail if the * user does not have the privileges to set realtime priorities. */ -bool set_realtime_priority(bool sched_fifo, int priority = 5); +bool set_realtime_priority(bool sched_fifo, int priority = 5) noexcept; /** * Check whether a process with the given PID is still active (and not a @@ -97,14 +97,14 @@ bool pid_running(pid_t pid); */ class ScopedFlushToZero { public: - ScopedFlushToZero(); - ~ScopedFlushToZero(); + ScopedFlushToZero() noexcept; + ~ScopedFlushToZero() noexcept; ScopedFlushToZero(const ScopedFlushToZero&) = delete; ScopedFlushToZero& operator=(const ScopedFlushToZero&) = delete; - ScopedFlushToZero(ScopedFlushToZero&&); - ScopedFlushToZero& operator=(ScopedFlushToZero&&); + ScopedFlushToZero(ScopedFlushToZero&&) noexcept; + ScopedFlushToZero& operator=(ScopedFlushToZero&&) noexcept; private: /** @@ -128,7 +128,7 @@ class ScopedFlushToZero { template class ScopedValueCache { public: - ScopedValueCache() {} + ScopedValueCache() noexcept {} ScopedValueCache(const ScopedValueCache&) = delete; ScopedValueCache& operator=(const ScopedValueCache&) = delete; @@ -141,7 +141,7 @@ class ScopedValueCache { * Return the cached value, if we're currently caching a value. Will return * a null pointer when this is not the case. */ - const T* get() const { return value ? &*value : nullptr; } + const T* get() const noexcept { return value ? &*value : nullptr; } /** * A guard that will reset the cached value on the `ScopedValueCache` when @@ -149,8 +149,9 @@ class ScopedValueCache { */ class Guard { public: - Guard(std::optional& cached_value) : cached_value(cached_value) {} - ~Guard() { + Guard(std::optional& cached_value) noexcept + : cached_value(cached_value) {} + ~Guard() noexcept { if (is_active) { cached_value.get().reset(); } @@ -159,10 +160,10 @@ class ScopedValueCache { Guard(const Guard&) = delete; Guard& operator=(const Guard&) = delete; - Guard(Guard&& o) : cached_value(std::move(o.cached_value)) { + Guard(Guard&& o) noexcept : cached_value(std::move(o.cached_value)) { o.is_active = false; } - Guard& operator=(Guard&& o) { + Guard& operator=(Guard&& o) noexcept { cached_value = std::move(o.cached_value); o.is_active = false; @@ -183,7 +184,7 @@ class ScopedValueCache { * * @throw std::runtime_error When we are already caching a value. */ - Guard set(T new_value) { + Guard set(T new_value) noexcept { value = std::move(new_value); return Guard(value); @@ -213,7 +214,7 @@ class TimedValueCache { * Return the cached value, if we're currently caching a value. Will return * a null pointer when this is not the case. */ - const T* get() const { + const T* get() const noexcept { const time_t now = time(nullptr); return now <= valid_until ? &value : nullptr; } @@ -224,7 +225,7 @@ class TimedValueCache { * be reset to `lifetime_seconds` seconds from now, if the value was still * active. */ - const T* get_and_keep_alive(unsigned int lifetime_seconds) { + const T* get_and_keep_alive(unsigned int lifetime_seconds) noexcept { const time_t now = time(nullptr); if (now <= valid_until) { valid_until = now + lifetime_seconds; @@ -237,7 +238,7 @@ class TimedValueCache { /** * Set the cached value for `lifetime_seconds` seconds. */ - void set(T value, unsigned int lifetime_seconds) { + void set(T value, unsigned int lifetime_seconds) noexcept { this->value = value; valid_until = time(nullptr) + lifetime_seconds; }