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,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<uint8_t>& 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user