mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 22:13:07 +01:00
Check value of DEBUG_LEVEL_X macro, not just definition
DEBUG_LEVEL_X macros are always defined to 0 or 1, this could prevent some optimisations from compilers, especially inlining `get_current_rotation()`.
This commit is contained in:
committed by
Ted John
parent
1fa99885d1
commit
1f0adb95da
@@ -1604,7 +1604,7 @@ uint8 get_current_rotation()
|
||||
{
|
||||
uint8 rotation = gCurrentRotation;
|
||||
uint8 rotation_masked = rotation & 3;
|
||||
#ifdef DEBUG_LEVEL_1
|
||||
#if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1
|
||||
if (rotation != rotation_masked) {
|
||||
log_error("Found wrong rotation %d! Will return %d instead.", (uint32)rotation, (uint32)rotation_masked);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user