From 4b4b15adb1c755bc650c999ac3c8e1b284687ad4 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Thu, 22 Dec 2022 08:56:32 -0500 Subject: 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) by the same amount (in cases where sizeof(T) is less than sizeof(Error)). --- AK/Error.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'AK') diff --git a/AK/Error.h b/AK/Error.h index b2221013b8..b963532a52 100644 --- a/AK/Error.h +++ b/AK/Error.h @@ -68,14 +68,14 @@ private: } 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) { } - int m_code { 0 }; StringView m_string_literal; + int m_code { 0 }; bool m_syscall { false }; }; -- cgit v1.2.3