Kernel: Switch static_asserts of a type size to AK::AssertSize

This will provide better debug ability when the size comparison fails.
This commit is contained in:
Brian Gianforcaro 2021-09-05 00:57:53 -07:00 committed by Andreas Kling
commit 472454cded
Notes: sideshowbarker 2024-07-18 04:40:22 +09:00
15 changed files with 25 additions and 19 deletions

View file

@ -40,7 +40,7 @@ private:
// NOTE: The rest of the header is 4 bytes
};
static_assert(sizeof(ICMPHeader) == 4);
static_assert(AssertSize<ICMPHeader, 4>());
struct [[gnu::packed]] ICMPEchoPacket {
ICMPHeader header;