1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 14:54:30 +01:00

Fix: Unused variable warning because of if constexpr (#12871)

This moves the variable in question to the scope where it gets used. Since it's a reference, this shouldn't be a performance hit.
This commit is contained in:
Hielke Morsink
2020-09-06 22:22:49 +02:00
committed by GitHub
parent 4e6935f689
commit 96d1db97e0

View File

@@ -92,7 +92,6 @@ template<DrawBlendOp TBlendOp, size_t TZoom> static void FASTCALL DrawRLESpriteM
auto srcY = args.SrcY;
auto width = args.Width;
auto height = args.Height;
auto& paletteMap = args.PalMap;
auto zoom = 1 << TZoom;
auto dstLineWidth = (static_cast<size_t>(dpi->width) >> TZoom) + dpi->pitch;
@@ -166,6 +165,7 @@ template<DrawBlendOp TBlendOp, size_t TZoom> static void FASTCALL DrawRLESpriteM
}
else
{
auto& paletteMap = args.PalMap;
while (numPixels > 0)
{
BlitPixel<TBlendOp>(src, dst, paletteMap);