1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00

Wrap asserts with _DEBUG as the variables don't exist for debug builds

This commit is contained in:
ζeh Matt
2024-12-14 16:24:40 +02:00
parent d352c31991
commit 5765bf3281

View File

@@ -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];
}