From 06d783f3ff4c448154edfe047e43b6bd041d99a8 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Tue, 7 May 2024 07:30:05 -0400 Subject: [PATCH] LibGfx/WebPLossless: Remove a useless non-spec comment There's already a spec comment saying the same thing a few lines further down, just move that up. No behavior change. --- .../Libraries/LibGfx/ImageFormats/WebPLoaderLossless.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Userland/Libraries/LibGfx/ImageFormats/WebPLoaderLossless.cpp b/Userland/Libraries/LibGfx/ImageFormats/WebPLoaderLossless.cpp index c8cd4808ae9a85..89954d9171f4a2 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/WebPLoaderLossless.cpp +++ b/Userland/Libraries/LibGfx/ImageFormats/WebPLoaderLossless.cpp @@ -185,14 +185,10 @@ static ErrorOr decode_webp_chunk_VP8L_prefix_code(LittleEndianInp return Error::from_string_literal("WebPImageDecoderPlugin: invalid max_symbol"); } - auto const code_length_code = TRY(CanonicalCode::from_bytes({ code_length_code_lengths, sizeof(code_length_code_lengths) })); - - // Next we extract the code lengths of the code that was used to encode the block. - - u8 last_non_zero = 8; // "If code 16 is used before a non-zero value has been emitted, a value of 8 is repeated." - // "A prefix table is then built from code_length_code_lengths and used to read up to max_symbol code lengths." dbgln_if(WEBP_DEBUG, " reading {} symbols from at most {} codes", alphabet_size, max_symbol); + auto const code_length_code = TRY(CanonicalCode::from_bytes({ code_length_code_lengths, sizeof(code_length_code_lengths) })); + u8 last_non_zero = 8; // "If code 16 is used before a non-zero value has been emitted, a value of 8 is repeated." while (code_lengths.size() < alphabet_size) { if (max_symbol == 0) break;