From 5a4d7fb0d6304279ce45b50b7764beaec76ffe8e Mon Sep 17 00:00:00 2001 From: Josiah VanderZee Date: Tue, 14 May 2024 09:03:11 -0500 Subject: [PATCH] Do not bother to assert that a u8 is >= 0 This fixes a warning seen in GCC 7 on CI about a comparison in mapblock.h that is always true. --- src/mapblock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mapblock.h b/src/mapblock.h index a32f9b312..843daf6ef 100644 --- a/src/mapblock.h +++ b/src/mapblock.h @@ -167,7 +167,7 @@ public: inline void setLightingComplete(LightBank bank, u8 direction, bool is_complete) { - assert(direction >= 0 && direction <= 5); + assert(direction <= 5); if (bank == LIGHTBANK_NIGHT) { direction += 6; } @@ -182,7 +182,7 @@ public: inline bool isLightingComplete(LightBank bank, u8 direction) { - assert(direction >= 0 && direction <= 5); + assert(direction <= 5); if (bank == LIGHTBANK_NIGHT) { direction += 6; }