From 40cc967c30e7297f580e433d088d0b4421cf084b Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Sun, 19 May 2024 23:36:33 +0300 Subject: [PATCH] Fix alignment issues in stack allocators --- Source/Engine/Core/Memory/Allocation.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Engine/Core/Memory/Allocation.h b/Source/Engine/Core/Memory/Allocation.h index 42b39a682..7d28c70cb 100644 --- a/Source/Engine/Core/Memory/Allocation.h +++ b/Source/Engine/Core/Memory/Allocation.h @@ -15,7 +15,7 @@ public: enum { HasSwap = false }; template - class Data + class alignas(sizeof(void*)) Data { private: byte _data[Capacity * sizeof(T)]; @@ -183,7 +183,7 @@ public: enum { HasSwap = false }; template - class Data + class alignas(sizeof(void*)) Data { private: typedef typename OtherAllocator::template Data OtherData;