From f63ec8de68d9e34bffdd3d24d7ede7a0a886ecda Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sat, 28 Jan 2023 21:39:51 -0500 Subject: [PATCH] LibGfx: Use auto more in ICC code --- Userland/Libraries/LibGfx/ICC/TagTypes.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Userland/Libraries/LibGfx/ICC/TagTypes.cpp b/Userland/Libraries/LibGfx/ICC/TagTypes.cpp index 0c94bc4d8b3..fd32999240c 100644 --- a/Userland/Libraries/LibGfx/ICC/TagTypes.cpp +++ b/Userland/Libraries/LibGfx/ICC/TagTypes.cpp @@ -70,7 +70,7 @@ ErrorOr> CurveTagData::from_bytes(ReadonlyBytes byte if (bytes.size() < 3 * sizeof(u32) + count * sizeof(u16)) return Error::from_string_literal("ICC::Profile: curveType has not enough data for curve points"); - BigEndian const* raw_values = bit_cast const*>(bytes.data() + 12); + auto* raw_values = bit_cast const*>(bytes.data() + 12); Vector values; TRY(values.try_resize(count)); @@ -286,7 +286,7 @@ ErrorOr> ParametricCurveTagData::from_byte if (bytes.size() < 2 * sizeof(u32) + 2 * sizeof(u16) + count * sizeof(s15Fixed16Number)) return Error::from_string_literal("ICC::Profile: parametricCurveType has not enough data for parameters"); - BigEndian const* raw_parameters = bit_cast const*>(bytes.data() + 12); + auto* raw_parameters = bit_cast const*>(bytes.data() + 12); Array parameters; parameters.fill(0); for (unsigned i = 0; i < count; ++i) @@ -308,7 +308,7 @@ ErrorOr> S15Fixed16ArrayTagData::from_byte return Error::from_string_literal("ICC::Profile: s15Fixed16ArrayType has wrong size"); size_t count = byte_size / sizeof(s15Fixed16Number); - BigEndian const* raw_values = bit_cast const*>(bytes.data() + 8); + auto* raw_values = bit_cast const*>(bytes.data() + 8); Vector values; TRY(values.try_resize(count)); for (size_t i = 0; i < count; ++i) @@ -489,7 +489,7 @@ ErrorOr> XYZTagData::from_bytes(ReadonlyBytes bytes, u return Error::from_string_literal("ICC::Profile: XYZType has wrong size"); size_t xyz_count = byte_size / sizeof(XYZNumber); - XYZNumber const* raw_xyzs = bit_cast(bytes.data() + 8); + auto* raw_xyzs = bit_cast(bytes.data() + 8); Vector xyzs; TRY(xyzs.try_resize(xyz_count)); for (size_t i = 0; i < xyz_count; ++i)