AK: Use else if constexpr in explode_byte()

This commit is contained in:
Stanisław Wiśniewski 2024-03-21 16:33:57 +01:00 committed by Andrew Kaster
parent 42d5883d57
commit 994fe0b89f
Notes: sideshowbarker 2024-07-17 08:25:15 +09:00

View file

@ -171,7 +171,7 @@ static constexpr FlatPtr explode_byte(u8 b)
FlatPtr value = b;
if constexpr (sizeof(FlatPtr) == 4)
return value << 24 | value << 16 | value << 8 | value;
else if (sizeof(FlatPtr) == 8)
else if constexpr (sizeof(FlatPtr) == 8)
return value << 56 | value << 48 | value << 40 | value << 32 | value << 24 | value << 16 | value << 8 | value;
}