AK: Rearrange Error's members to reduce its size by 8 bytes

This shrinks sizeof(Error) from 32 bytes to 24 bytes, which in turn will
shrink sizeof(ErrorOr<T>) by the same amount (in cases where sizeof(T)
is less than sizeof(Error)).
This commit is contained in:
Timothy Flynn 2022-12-22 08:56:32 -05:00 committed by Tim Flynn
parent 74de1f6193
commit 4b4b15adb1
Notes: sideshowbarker 2024-07-17 02:54:32 +09:00

View File

@ -68,14 +68,14 @@ private:
} }
Error(StringView syscall_name, int rc) Error(StringView syscall_name, int rc)
: m_code(-rc) : m_string_literal(syscall_name)
, m_string_literal(syscall_name) , m_code(-rc)
, m_syscall(true) , m_syscall(true)
{ {
} }
int m_code { 0 };
StringView m_string_literal; StringView m_string_literal;
int m_code { 0 };
bool m_syscall { false }; bool m_syscall { false };
}; };