LibGfx/WebP: Rename two variables to be a bit clearer
No behavior change.
This commit is contained in:
parent
4d5823a5bc
commit
dd020a108a
Notes:
sideshowbarker
2024-07-17 01:13:25 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/dd020a108a Pull-request: https://github.com/SerenityOS/serenity/pull/24196
1 changed files with 6 additions and 6 deletions
|
@ -81,17 +81,17 @@ private:
|
|||
|
||||
ErrorOr<CanonicalCode> CanonicalCode::from_bytes(ReadonlyBytes bytes)
|
||||
{
|
||||
auto non_zero_symbols = 0;
|
||||
auto last_non_zero = -1;
|
||||
auto non_zero_symbol_count = 0;
|
||||
auto last_non_zero_symbol = -1;
|
||||
for (size_t i = 0; i < bytes.size(); i++) {
|
||||
if (bytes[i] != 0) {
|
||||
non_zero_symbols++;
|
||||
last_non_zero = i;
|
||||
non_zero_symbol_count++;
|
||||
last_non_zero_symbol = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (non_zero_symbols == 1)
|
||||
return CanonicalCode(last_non_zero);
|
||||
if (non_zero_symbol_count == 1)
|
||||
return CanonicalCode(last_non_zero_symbol);
|
||||
|
||||
return CanonicalCode(TRY(Compress::CanonicalCode::from_bytes(bytes)));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue