From 27189850d8ce07442626509e0ee0ec1e689b186a Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Wed, 4 Jan 2023 13:42:37 -0500 Subject: [PATCH] LibGfx: Sort ICC parsing functions by spec number --- Userland/Libraries/LibGfx/ICCProfile.cpp | 28 ++++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Userland/Libraries/LibGfx/ICCProfile.cpp b/Userland/Libraries/LibGfx/ICCProfile.cpp index f7711ce33ea..72492006af5 100644 --- a/Userland/Libraries/LibGfx/ICCProfile.cpp +++ b/Userland/Libraries/LibGfx/ICCProfile.cpp @@ -192,6 +192,20 @@ ErrorOr parse_connection_space(ICCHeader const& header) return space; } +ErrorOr parse_creation_date_time(ICCHeader const& header) +{ + // ICC v4, 7.2.8 Date and time field + return parse_date_time_number(header.profile_creation_time); +} + +ErrorOr parse_file_signature(ICCHeader const& header) +{ + // ICC v4, 7.2.9 Profile file signature field + if (header.profile_file_signature != 0x61637370) + return Error::from_string_literal("ICC::Profile: profile file signature not 'acsp'"); + return {}; +} + ErrorOr parse_rendering_intent(ICCHeader const& header) { // ICC v4, 7.2.15 Rendering intent field @@ -219,20 +233,6 @@ ErrorOr parse_pcs_illuminant(ICCHeader const& header) return xyz; } - -ErrorOr parse_creation_date_time(ICCHeader const& header) -{ - // ICC v4, 7.2.8 Date and time field - return parse_date_time_number(header.profile_creation_time); -} - -ErrorOr parse_file_signature(ICCHeader const& header) -{ - // ICC v4, 7.2.9 Profile file signature field - if (header.profile_file_signature != 0x61637370) - return Error::from_string_literal("ICC::Profile: profile file signature not 'acsp'"); - return {}; -} } StringView device_class_name(DeviceClass device_class)