From 5765bf328197edd0ce2a6473047007846c1a85c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Sat, 14 Dec 2024 16:24:40 +0200 Subject: [PATCH] Wrap asserts with _DEBUG as the variables don't exist for debug builds --- src/openrct2/drawing/Drawing.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/openrct2/drawing/Drawing.cpp b/src/openrct2/drawing/Drawing.cpp index 9d7eace2fc..65fafd5b72 100644 --- a/src/openrct2/drawing/Drawing.cpp +++ b/src/openrct2/drawing/Drawing.cpp @@ -55,9 +55,11 @@ uint8_t PaletteMap::operator[](size_t index) const uint8_t PaletteMap::Blend(uint8_t src, uint8_t dst) const { +#ifdef _DEBUG // src = 0 would be transparent so there is no blend palette for that, hence (src - 1) assert(src != 0 && (src - 1) < _numMaps); assert(dst < _mapLength); +#endif auto idx = ((src - 1) * 256) + dst; return _data[idx]; }