diff options
author | Andreas Kling <kling@serenityos.org> | 2022-04-07 20:42:09 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-07 20:43:35 +0200 |
commit | 17632c3d2d92f91cfa72afdb3b9356bf644790ff (patch) | |
tree | 66b4189d91c26e339850ce7d9ed8b01af1d4dc78 /Userland/Libraries/LibGfx/PNGLoader.cpp | |
parent | 154cb4e3680de151fb3f12743cf1563e791e9b70 (diff) | |
download | serenity-17632c3d2d92f91cfa72afdb3b9356bf644790ff.zip |
LibGfx: Rename conflicting Quad<T> in PNG loader to Quartet<T>
Quad was conflicting with the new Gfx::Quad, and "Quartet" fits the
naming scheme used in the rest of this file better anyway.
Diffstat (limited to 'Userland/Libraries/LibGfx/PNGLoader.cpp')
-rw-r--r-- | Userland/Libraries/LibGfx/PNGLoader.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibGfx/PNGLoader.cpp b/Userland/Libraries/LibGfx/PNGLoader.cpp index 1a5a5247be..65f118bf78 100644 --- a/Userland/Libraries/LibGfx/PNGLoader.cpp +++ b/Userland/Libraries/LibGfx/PNGLoader.cpp @@ -61,7 +61,7 @@ struct [[gnu::packed]] Triplet { }; template<typename T> -struct [[gnu::packed]] Quad { +struct [[gnu::packed]] Quartet { T r; T g; T b; @@ -401,13 +401,13 @@ NEVER_INLINE FLATTEN static ErrorOr<void> unfilter(PNGLoadingContext& context) } } else if (context.bit_depth == 16) { for (int y = 0; y < context.height; ++y) { - auto* triplets = reinterpret_cast<Quad<u16> const*>(context.scanlines[y].data.data()); + auto* quartets = reinterpret_cast<Quartet<u16> const*>(context.scanlines[y].data.data()); for (int i = 0; i < context.width; ++i) { auto& pixel = (Pixel&)context.bitmap->scanline(y)[i]; - pixel.r = triplets[i].r & 0xFF; - pixel.g = triplets[i].g & 0xFF; - pixel.b = triplets[i].b & 0xFF; - pixel.a = triplets[i].a & 0xFF; + pixel.r = quartets[i].r & 0xFF; + pixel.g = quartets[i].g & 0xFF; + pixel.b = quartets[i].b & 0xFF; + pixel.a = quartets[i].a & 0xFF; } } } else { |