1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 12:17:45 +00:00

Everywhere: "indexes" => "indices"

I've wasted a silly amount of time in the past fretting over which
of these words to use. Let's just choose one and use it everywhere. :^)
This commit is contained in:
Andreas Kling 2021-04-29 22:23:52 +02:00
parent 7ae7170d61
commit 3d4afe7614
29 changed files with 139 additions and 139 deletions

View file

@ -430,10 +430,10 @@ NEVER_INLINE FLATTEN static bool unfilter(PNGLoadingContext& context)
auto pixels_per_byte = 8 / context.bit_depth;
auto mask = (1 << context.bit_depth) - 1;
for (int y = 0; y < context.height; ++y) {
auto* palette_indexes = context.scanlines[y].data.data();
auto* palette_indices = context.scanlines[y].data.data();
for (int i = 0; i < context.width; ++i) {
auto bit_offset = (8 - context.bit_depth) - (context.bit_depth * (i % pixels_per_byte));
auto palette_index = (palette_indexes[i / pixels_per_byte] >> bit_offset) & mask;
auto palette_index = (palette_indices[i / pixels_per_byte] >> bit_offset) & mask;
auto& pixel = (Pixel&)context.bitmap->scanline(y)[i];
if ((size_t)palette_index >= context.palette_data.size())
return false;