Standardise fixed-width integer usage in touched files

This commit is contained in:
notmatthewbeshay
2026-03-10 19:14:32 +11:00
parent 83ba8d8384
commit 0ab0fd9209
64 changed files with 229 additions and 229 deletions

View File

@@ -183,8 +183,8 @@ void Player::defineSynchedData()
{
this->Mob::defineSynchedData();
entityData->define(DATA_PLAYER_FLAGS_ID, (uint8_t) 0);
entityData->define(DATA_PLAYER_RUNNING_ID, (uint8_t) 0);
entityData->define(DATA_PLAYER_FLAGS_ID, (std::uint8_t) 0);
entityData->define(DATA_PLAYER_RUNNING_ID, (std::uint8_t) 0);
}
std::shared_ptr<ItemInstance> Player::getUseItem()
@@ -572,7 +572,7 @@ void Player::completeUsingItem()
}
}
void Player::handleEntityEvent(uint8_t id)
void Player::handleEntityEvent(std::uint8_t id)
{
if (id == EntityEvent::USE_ITEM_COMPLETE)
{
@@ -1979,14 +1979,14 @@ bool Player::getPlayerFlag(int flag)
void Player::setPlayerFlag(int flag, bool value)
{
uint8_t currentValue = entityData->getByte(DATA_PLAYER_FLAGS_ID);
std::uint8_t currentValue = entityData->getByte(DATA_PLAYER_FLAGS_ID);
if (value)
{
entityData->set(DATA_PLAYER_FLAGS_ID, (uint8_t) (currentValue | (1 << flag)));
entityData->set(DATA_PLAYER_FLAGS_ID, (std::uint8_t) (currentValue | (1 << flag)));
}
else
{
entityData->set(DATA_PLAYER_FLAGS_ID, (uint8_t) (currentValue & ~(1 << flag)));
entityData->set(DATA_PLAYER_FLAGS_ID, (std::uint8_t) (currentValue & ~(1 << flag)));
}
}