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.
This commit is contained in:
Josiah VanderZee 2024-05-14 09:03:11 -05:00 committed by Lars Müller
parent 6303334cc2
commit 5a4d7fb0d6
1 changed files with 2 additions and 2 deletions

View File

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