Kernel: Remove superfluous alignas(T) from KResultOr<T>

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<bool>`. GCC somehow compiled this (probably just
ignored it), but this caused a build error with Clang.

Closes #8072
This commit is contained in:
Daniel Bertalan 2021-06-24 10:43:59 +02:00 committed by Ali Mohammad Pur
parent 2d2747cb15
commit ffb118265b
Notes: sideshowbarker 2024-07-18 11:34:23 +09:00

View file

@ -43,7 +43,7 @@ private:
};
template<typename T>
class alignas(T) [[nodiscard]] KResultOr {
class [[nodiscard]] KResultOr {
public:
KResultOr(KResult error)
: m_error(error)