From a0513a360a6653a60a31b2827c8afea6fdd39fe7 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sat, 28 Jan 2023 09:22:57 -0500 Subject: [PATCH] LibGfx: Use AssertSize<> in ICC/Profile.cpp --- Userland/Libraries/LibGfx/ICC/Profile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibGfx/ICC/Profile.cpp b/Userland/Libraries/LibGfx/ICC/Profile.cpp index f1db710583..25efbebb40 100644 --- a/Userland/Libraries/LibGfx/ICC/Profile.cpp +++ b/Userland/Libraries/LibGfx/ICC/Profile.cpp @@ -115,7 +115,7 @@ struct ICCHeader { u8 profile_id[16]; u8 reserved[28]; }; -static_assert(sizeof(ICCHeader) == 128); +static_assert(AssertSize()); ErrorOr parse_size(ICCHeader const& header, ReadonlyBytes icc_bytes) { @@ -623,7 +623,7 @@ ErrorOr Profile::read_tag_table(ReadonlyBytes bytes) BigEndian offset_to_beginning_of_tag_data_element; BigEndian size_of_tag_data_element; }; - static_assert(sizeof(TagTableEntry) == 12); + static_assert(AssertSize()); tag_table_bytes = tag_table_bytes.slice(sizeof(u32)); if (tag_table_bytes.size() < tag_count * sizeof(TagTableEntry))