mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-05 15:40:31 +00:00
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:
parent
2d2747cb15
commit
ffb118265b
|
@ -43,7 +43,7 @@ private:
|
|||
};
|
||||
|
||||
template<typename T>
|
||||
class alignas(T) [[nodiscard]] KResultOr {
|
||||
class [[nodiscard]] KResultOr {
|
||||
public:
|
||||
KResultOr(KResult error)
|
||||
: m_error(error)
|
||||
|
|
Loading…
Reference in a new issue