1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:37:45 +00:00

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
parent 112de58fe0
commit 472454cded
15 changed files with 25 additions and 19 deletions

View file

@ -59,7 +59,7 @@ private:
static constexpr u16 LargeSend = 0x800u;
};
static_assert(sizeof(TXDescriptor) == 16u);
static_assert(AssertSize<TXDescriptor, 16u>());
struct [[gnu::packed]] RXDescriptor {
volatile u16 buffer_size; // top 2 bits are reserved
@ -83,7 +83,7 @@ private:
static constexpr u16 CRCError = 0x8;
};
static_assert(sizeof(RXDescriptor) == 16u);
static_assert(AssertSize<RXDescriptor, 16u>());
enum class ChipVersion : u8 {
Unknown = 0,