mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:37:46 +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
|
@ -244,7 +244,7 @@ private:
|
|||
bool m_in_use; // Has this TD been allocated (and therefore in use)?
|
||||
};
|
||||
|
||||
static_assert(sizeof(TransferDescriptor) == 32); // Transfer Descriptor is always 8 Dwords
|
||||
static_assert(AssertSize<TransferDescriptor, 32>()); // Transfer Descriptor is always 8 Dwords
|
||||
|
||||
//
|
||||
// Queue Head
|
||||
|
@ -361,5 +361,5 @@ private:
|
|||
bool m_in_use { false }; // Is this QH currently in use?
|
||||
};
|
||||
|
||||
static_assert(sizeof(QueueHead) == 32); // Queue Head is always 8 Dwords
|
||||
static_assert(AssertSize<QueueHead, 32>()); // Queue Head is always 8 Dwords
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ struct [[gnu::packed]] HubStatus {
|
|||
u16 status { 0 };
|
||||
u16 change { 0 };
|
||||
};
|
||||
static_assert(sizeof(HubStatus) == 4);
|
||||
static_assert(AssertSize<HubStatus, 4>());
|
||||
|
||||
static constexpr u16 HUB_STATUS_LOCAL_POWER_SOURCE = (1 << 0);
|
||||
static constexpr u16 HUB_STATUS_OVER_CURRENT = (1 << 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue