Skip to content

Commit

Permalink
LibGfx/WebPLossless: Remove a useless non-spec comment
Browse files Browse the repository at this point in the history
There's already a spec comment saying the same thing a few lines
further down, just move that up.

No behavior change.
  • Loading branch information
nico committed May 7, 2024
1 parent 4e8f080 commit 06d783f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Userland/Libraries/LibGfx/ImageFormats/WebPLoaderLossless.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,10 @@ static ErrorOr<CanonicalCode> 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;
Expand Down

0 comments on commit 06d783f

Please sign in to comment.