mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-22 07:13:07 +01:00
Wrap asserts with _DEBUG as the variables don't exist for debug builds
This commit is contained in:
@@ -55,9 +55,11 @@ uint8_t PaletteMap::operator[](size_t index) const
|
|||||||
|
|
||||||
uint8_t PaletteMap::Blend(uint8_t src, uint8_t dst) 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)
|
// src = 0 would be transparent so there is no blend palette for that, hence (src - 1)
|
||||||
assert(src != 0 && (src - 1) < _numMaps);
|
assert(src != 0 && (src - 1) < _numMaps);
|
||||||
assert(dst < _mapLength);
|
assert(dst < _mapLength);
|
||||||
|
#endif
|
||||||
auto idx = ((src - 1) * 256) + dst;
|
auto idx = ((src - 1) * 256) + dst;
|
||||||
return _data[idx];
|
return _data[idx];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user