mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 12:30:12 +02:00
Add noexcept qualifications in src/common
Apparently this can actually make a difference in some cases, and the C++ Core Guideliens recommend doing this on all default constructors, destructors, and all functions that can not throw (and thus also don't allocate).
This commit is contained in:
@@ -16,12 +16,12 @@
|
||||
|
||||
#include "component-handler-2.h"
|
||||
|
||||
YaComponentHandler2::ConstructArgs::ConstructArgs() {}
|
||||
YaComponentHandler2::ConstructArgs::ConstructArgs() noexcept {}
|
||||
|
||||
YaComponentHandler2::ConstructArgs::ConstructArgs(
|
||||
Steinberg::IPtr<Steinberg::FUnknown> object)
|
||||
Steinberg::IPtr<Steinberg::FUnknown> object) noexcept
|
||||
: supported(
|
||||
Steinberg::FUnknownPtr<Steinberg::Vst::IComponentHandler2>(object)) {}
|
||||
|
||||
YaComponentHandler2::YaComponentHandler2(const ConstructArgs&& args)
|
||||
YaComponentHandler2::YaComponentHandler2(const ConstructArgs&& args) noexcept
|
||||
: arguments(std::move(args)) {}
|
||||
|
||||
@@ -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<Steinberg::FUnknown> object);
|
||||
ConstructArgs(Steinberg::IPtr<Steinberg::FUnknown> 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)`
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
|
||||
#include "component-handler-3.h"
|
||||
|
||||
YaComponentHandler3::ConstructArgs::ConstructArgs() {}
|
||||
YaComponentHandler3::ConstructArgs::ConstructArgs() noexcept {}
|
||||
|
||||
YaComponentHandler3::ConstructArgs::ConstructArgs(
|
||||
Steinberg::IPtr<Steinberg::FUnknown> object)
|
||||
Steinberg::IPtr<Steinberg::FUnknown> object) noexcept
|
||||
: supported(
|
||||
Steinberg::FUnknownPtr<Steinberg::Vst::IComponentHandler3>(object)) {}
|
||||
|
||||
YaComponentHandler3::YaComponentHandler3(const ConstructArgs&& args)
|
||||
YaComponentHandler3::YaComponentHandler3(const ConstructArgs&& args) noexcept
|
||||
: arguments(std::move(args)) {}
|
||||
|
||||
@@ -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<Steinberg::FUnknown> object);
|
||||
ConstructArgs(Steinberg::IPtr<Steinberg::FUnknown> 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
|
||||
|
||||
+3
-3
@@ -16,13 +16,13 @@
|
||||
|
||||
#include "component-handler-bus-activation.h"
|
||||
|
||||
YaComponentHandlerBusActivation::ConstructArgs::ConstructArgs() {}
|
||||
YaComponentHandlerBusActivation::ConstructArgs::ConstructArgs() noexcept {}
|
||||
|
||||
YaComponentHandlerBusActivation::ConstructArgs::ConstructArgs(
|
||||
Steinberg::IPtr<Steinberg::FUnknown> object)
|
||||
Steinberg::IPtr<Steinberg::FUnknown> object) noexcept
|
||||
: supported(Steinberg::FUnknownPtr<
|
||||
Steinberg::Vst::IComponentHandlerBusActivation>(object)) {}
|
||||
|
||||
YaComponentHandlerBusActivation::YaComponentHandlerBusActivation(
|
||||
const ConstructArgs&& args)
|
||||
const ConstructArgs&& args) noexcept
|
||||
: arguments(std::move(args)) {}
|
||||
|
||||
@@ -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<Steinberg::FUnknown> object);
|
||||
ConstructArgs(Steinberg::IPtr<Steinberg::FUnknown> 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
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
|
||||
#include "component-handler.h"
|
||||
|
||||
YaComponentHandler::ConstructArgs::ConstructArgs() {}
|
||||
YaComponentHandler::ConstructArgs::ConstructArgs() noexcept {}
|
||||
|
||||
YaComponentHandler::ConstructArgs::ConstructArgs(
|
||||
Steinberg::IPtr<Steinberg::FUnknown> object)
|
||||
Steinberg::IPtr<Steinberg::FUnknown> object) noexcept
|
||||
: supported(
|
||||
Steinberg::FUnknownPtr<Steinberg::Vst::IComponentHandler>(object)) {}
|
||||
|
||||
YaComponentHandler::YaComponentHandler(const ConstructArgs&& args)
|
||||
YaComponentHandler::YaComponentHandler(const ConstructArgs&& args) noexcept
|
||||
: arguments(std::move(args)) {}
|
||||
|
||||
@@ -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<Steinberg::FUnknown> object);
|
||||
ConstructArgs(Steinberg::IPtr<Steinberg::FUnknown> 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
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
#include "progress.h"
|
||||
|
||||
YaProgress::ConstructArgs::ConstructArgs() {}
|
||||
YaProgress::ConstructArgs::ConstructArgs() noexcept {}
|
||||
|
||||
YaProgress::ConstructArgs::ConstructArgs(
|
||||
Steinberg::IPtr<Steinberg::FUnknown> object)
|
||||
Steinberg::IPtr<Steinberg::FUnknown> object) noexcept
|
||||
: supported(Steinberg::FUnknownPtr<Steinberg::Vst::IProgress>(object)) {}
|
||||
|
||||
YaProgress::YaProgress(const ConstructArgs&& args)
|
||||
YaProgress::YaProgress(const ConstructArgs&& args) noexcept
|
||||
: arguments(std::move(args)) {}
|
||||
|
||||
@@ -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<Steinberg::FUnknown> object);
|
||||
ConstructArgs(Steinberg::IPtr<Steinberg::FUnknown> 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,
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
|
||||
#include "unit-handler-2.h"
|
||||
|
||||
YaUnitHandler2::ConstructArgs::ConstructArgs() {}
|
||||
YaUnitHandler2::ConstructArgs::ConstructArgs() noexcept {}
|
||||
|
||||
YaUnitHandler2::ConstructArgs::ConstructArgs(
|
||||
Steinberg::IPtr<Steinberg::FUnknown> object)
|
||||
Steinberg::IPtr<Steinberg::FUnknown> object) noexcept
|
||||
: supported(Steinberg::FUnknownPtr<Steinberg::Vst::IUnitHandler2>(object)) {
|
||||
}
|
||||
|
||||
YaUnitHandler2::YaUnitHandler2(const ConstructArgs&& args)
|
||||
YaUnitHandler2::YaUnitHandler2(const ConstructArgs&& args) noexcept
|
||||
: arguments(std::move(args)) {}
|
||||
|
||||
@@ -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<Steinberg::FUnknown> object);
|
||||
ConstructArgs(Steinberg::IPtr<Steinberg::FUnknown> 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
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
#include "unit-handler.h"
|
||||
|
||||
YaUnitHandler::ConstructArgs::ConstructArgs() {}
|
||||
YaUnitHandler::ConstructArgs::ConstructArgs() noexcept {}
|
||||
|
||||
YaUnitHandler::ConstructArgs::ConstructArgs(
|
||||
Steinberg::IPtr<Steinberg::FUnknown> object)
|
||||
Steinberg::IPtr<Steinberg::FUnknown> object) noexcept
|
||||
: supported(Steinberg::FUnknownPtr<Steinberg::Vst::IUnitHandler>(object)) {}
|
||||
|
||||
YaUnitHandler::YaUnitHandler(const ConstructArgs&& args)
|
||||
YaUnitHandler::YaUnitHandler(const ConstructArgs&& args) noexcept
|
||||
: arguments(std::move(args)) {}
|
||||
|
||||
@@ -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<Steinberg::FUnknown> object);
|
||||
ConstructArgs(Steinberg::IPtr<Steinberg::FUnknown> 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
|
||||
|
||||
Reference in New Issue
Block a user