Fix various discarded W4 compiler warnings

This commit is contained in:
Lwmte 2023-06-16 23:07:37 +02:00
parent a79d63f61d
commit b91dce1ce1
39 changed files with 40 additions and 90 deletions

View file

@ -767,7 +767,7 @@ aiBitsType Moveable::GetAIBits() const
aiBitsArray ret{};
for (size_t i = 0; i < ret.size(); ++i)
{
uint8_t isSet = m_item->AIBits & (1 << i);
unsigned char isSet = m_item->AIBits & (1 << i);
ret[i] = static_cast<int>( isSet > 0);
}
@ -787,7 +787,7 @@ void Moveable::SetAIBits(aiBitsType const & bits)
for (size_t i = 0; i < bits.value().size(); ++i)
{
m_item->AIBits &= ~(1 << i);
uint8_t isSet = bits.value()[i] > 0;
unsigned char isSet = bits.value()[i] > 0;
m_item->AIBits |= isSet << i;
}
}