summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-12-22 08:56:32 -0500
committerTim Flynn <trflynn89@pm.me>2022-12-22 14:13:56 -0500
commit4b4b15adb1c755bc650c999ac3c8e1b284687ad4 (patch)
tree92bbaa2dc21f40e16204ff299e16d1b2cc9dfac8 /AK
parent74de1f619353e9e2423a16a2d6aae300e05575f5 (diff)
downloadserenity-4b4b15adb1c755bc650c999ac3c8e1b284687ad4.zip
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)).
Diffstat (limited to 'AK')
-rw-r--r--AK/Error.h6
1 files changed, 3 insertions, 3 deletions
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 };
};