From 095ca1153504813433bbece7572f5457abe8b384 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sat, 22 May 2021 23:45:52 +0200 Subject: [PATCH] Add alignment hints to types stored in containers --- src/common/serialization/vst3/event-list.h | 2 +- src/common/serialization/vst3/param-value-queue.h | 2 +- src/common/serialization/vst3/process-data.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/serialization/vst3/event-list.h b/src/common/serialization/vst3/event-list.h index 8f8c2520..c98a04e1 100644 --- a/src/common/serialization/vst3/event-list.h +++ b/src/common/serialization/vst3/event-list.h @@ -161,7 +161,7 @@ struct YaScaleEvent { * A wrapper around `Event` for serialization purposes, as some event types * include heap pointers. */ -struct YaEvent { +struct alignas(16) YaEvent { YaEvent() noexcept; /** diff --git a/src/common/serialization/vst3/param-value-queue.h b/src/common/serialization/vst3/param-value-queue.h index 8243bcbe..cdd38e81 100644 --- a/src/common/serialization/vst3/param-value-queue.h +++ b/src/common/serialization/vst3/param-value-queue.h @@ -30,7 +30,7 @@ * a single parameter during the current processing cycle. Used in * `YaParameterChanges`. */ -class YaParamValueQueue : public Steinberg::Vst::IParamValueQueue { +class alignas(16) YaParamValueQueue : public Steinberg::Vst::IParamValueQueue { public: /** * We only provide a default constructor here, because we need to fill the diff --git a/src/common/serialization/vst3/process-data.h b/src/common/serialization/vst3/process-data.h index e4141079..a8a21c55 100644 --- a/src/common/serialization/vst3/process-data.h +++ b/src/common/serialization/vst3/process-data.h @@ -36,7 +36,7 @@ * * @see YaProcessData */ -class YaAudioBusBuffers { +class alignas(16) YaAudioBusBuffers { public: /** * We only provide a default constructor here, because we need to fill the