mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-08-17 01:10:28 +03:00
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:
parent
74de1f6193
commit
4b4b15adb1
Notes:
sideshowbarker
2024-07-17 02:54:32 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/4b4b15adb1 Pull-request: https://github.com/SerenityOS/serenity/pull/16624 Reviewed-by: https://github.com/awesomekling ✅
@ -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 };
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user