|
@@ -3,7 +3,7 @@
|
|
|
|
|
|
#define alignmentof(type) __alignof__(type)
|
|
|
|
|
|
-#define ASSERT_ALIGNED_DATA(var, type) \
|
|
|
+#define CORE_ASSERT_ALIGNED_DATA(var, type) \
|
|
|
static_assert(sizeof(var) == sizeof(type), "aligned data size missmatch"); \
|
|
|
static_assert(var.getSize() >= var.getAlignment(), "size >= alignment"); \
|
|
|
static_assert(alignmentof(var) == alignmentof(type), \
|
|
@@ -11,7 +11,7 @@
|
|
|
|
|
|
namespace Core {
|
|
|
template<int SIZE, int ALIGNMENT>
|
|
|
- class alignas(ALIGNMENT) AlignedData {
|
|
|
+ class alignas(ALIGNMENT) AlignedData final {
|
|
|
static_assert(SIZE > 0, "size must be positive");
|
|
|
char buffer[static_cast<unsigned int>(SIZE)] = {};
|
|
|
|