From 6d70b6a3a77d28e93ccc02d4a3c4026560a15fee Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sat, 7 Jan 2023 11:04:36 -0500 Subject: [PATCH] LibGfx: Put parse_device_attributes() in spec order --- Userland/Libraries/LibGfx/ICCProfile.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Userland/Libraries/LibGfx/ICCProfile.cpp b/Userland/Libraries/LibGfx/ICCProfile.cpp index 78adbffccd..6406492965 100644 --- a/Userland/Libraries/LibGfx/ICCProfile.cpp +++ b/Userland/Libraries/LibGfx/ICCProfile.cpp @@ -217,17 +217,6 @@ ErrorOr parse_creation_date_time(ICCHeader const& header) return parse_date_time_number(header.profile_creation_time); } -ErrorOr parse_device_attributes(ICCHeader const& header) -{ - // ICC v4, 7.2.14 Device attributes field - - // "4 to 31": "Reserved (set to binary zero)" - if (header.device_attributes & 0xffff'fff0) - return Error::from_string_literal("ICC::Profile: Device attributes reserved bits not set to 0"); - - return DeviceAttributes { header.device_attributes }; -} - ErrorOr parse_file_signature(ICCHeader const& header) { // ICC v4, 7.2.9 Profile file signature field @@ -269,6 +258,17 @@ Optional parse_device_model(ICCHeader const& header) return DeviceModel { header.device_model }; } +ErrorOr parse_device_attributes(ICCHeader const& header) +{ + // ICC v4, 7.2.14 Device attributes field + + // "4 to 31": "Reserved (set to binary zero)" + if (header.device_attributes & 0xffff'fff0) + return Error::from_string_literal("ICC::Profile: Device attributes reserved bits not set to 0"); + + return DeviceAttributes { header.device_attributes }; +} + ErrorOr parse_rendering_intent(ICCHeader const& header) { // ICC v4, 7.2.15 Rendering intent field