mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47: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:
parent
112de58fe0
commit
472454cded
15 changed files with 25 additions and 19 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/VirtualAddress.h>
|
||||
|
||||
|
@ -100,7 +101,7 @@ union [[gnu::packed]] Descriptor {
|
|||
}
|
||||
};
|
||||
|
||||
static_assert(sizeof(Descriptor) == 8);
|
||||
static_assert(AssertSize<Descriptor, 8>());
|
||||
|
||||
enum class IDTEntryType {
|
||||
TaskGate32 = 0b0101,
|
||||
|
@ -174,6 +175,6 @@ struct [[gnu::packed]] IDTEntry
|
|||
};
|
||||
// clang-format on
|
||||
|
||||
static_assert(sizeof(IDTEntry) == 2 * sizeof(void*));
|
||||
static_assert(AssertSize<IDTEntry, 2 * sizeof(void*)>());
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue