From ffb118265b3f3481b4edc197b51e84c0c10531c1 Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Thu, 24 Jun 2021 10:43:59 +0200 Subject: [PATCH] Kernel: Remove superfluous `alignas(T)` from `KResultOr` Since `m_storage` is already guaranteed to be correctly aligned for the type, we can forgo specifying it for the entire class. This fixes an error: previously, this would *force* the value type's alignment on the entire class, which would try to make 1-byte aligned ints with `KResultOr`. GCC somehow compiled this (probably just ignored it), but this caused a build error with Clang. Closes #8072 --- Kernel/KResult.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/KResult.h b/Kernel/KResult.h index 05cc34b61b..793d65438e 100644 --- a/Kernel/KResult.h +++ b/Kernel/KResult.h @@ -43,7 +43,7 @@ private: }; template -class alignas(T) [[nodiscard]] KResultOr { +class [[nodiscard]] KResultOr { public: KResultOr(KResult error) : m_error(error)