Codechange: rename byte to uint8_t (#12308)

This commit is contained in:
Patric Stout
2024-03-16 23:59:32 +01:00
committed by GitHub
parent bd7120bae4
commit a3cfd23cf9
355 changed files with 1654 additions and 1656 deletions

View File

@@ -100,7 +100,7 @@ struct ETileArea : TileArea {
* if centered, C/P start from the centre and c/p are not available.
* @return Platform information in bit-stuffed format.
*/
uint32_t GetPlatformInfo(Axis axis, byte tile, int platforms, int length, int x, int y, bool centred)
uint32_t GetPlatformInfo(Axis axis, uint8_t tile, int platforms, int length, int x, int y, bool centred)
{
uint32_t retval = 0;
@@ -140,7 +140,7 @@ uint32_t GetPlatformInfo(Axis axis, byte tile, int platforms, int length, int x,
*/
static TileIndex FindRailStationEnd(TileIndex tile, TileIndexDiff delta, bool check_type, bool check_axis)
{
byte orig_type = 0;
uint8_t orig_type = 0;
Axis orig_axis = AXIS_X;
StationID sid = GetStationIndex(tile);
@@ -266,7 +266,7 @@ TownScopeResolver *StationResolverObject::GetTown()
return this->town_scope;
}
/* virtual */ uint32_t StationScopeResolver::GetVariable(byte variable, [[maybe_unused]] uint32_t parameter, bool *available) const
/* virtual */ uint32_t StationScopeResolver::GetVariable(uint8_t variable, [[maybe_unused]] uint32_t parameter, bool *available) const
{
if (this->st == nullptr) {
/* Station does not exist, so we're in a purchase list or the land slope check callback. */
@@ -403,7 +403,7 @@ TownScopeResolver *StationResolverObject::GetTown()
return this->st->GetNewGRFVariable(this->ro, variable, parameter, available);
}
uint32_t Station::GetNewGRFVariable(const ResolverObject &object, byte variable, byte parameter, bool *available) const
uint32_t Station::GetNewGRFVariable(const ResolverObject &object, uint8_t variable, uint8_t parameter, bool *available) const
{
switch (variable) {
case 0x48: { // Accepted cargo types
@@ -469,7 +469,7 @@ uint32_t Station::GetNewGRFVariable(const ResolverObject &object, byte variable,
return UINT_MAX;
}
uint32_t Waypoint::GetNewGRFVariable(const ResolverObject &, byte variable, [[maybe_unused]] byte parameter, bool *available) const
uint32_t Waypoint::GetNewGRFVariable(const ResolverObject &, uint8_t variable, [[maybe_unused]] uint8_t parameter, bool *available) const
{
switch (variable) {
case 0x48: return 0; // Accepted cargo types
@@ -658,7 +658,7 @@ uint16_t GetStationCallback(CallbackID callback, uint32_t param1, uint32_t param
* @param numtracks Number of platforms.
* @return Succeeded or failed command.
*/
CommandCost PerformStationTileSlopeCheck(TileIndex north_tile, TileIndex cur_tile, const StationSpec *statspec, Axis axis, byte plat_len, byte numtracks)
CommandCost PerformStationTileSlopeCheck(TileIndex north_tile, TileIndex cur_tile, const StationSpec *statspec, Axis axis, uint8_t plat_len, uint8_t numtracks)
{
TileIndex diff = cur_tile - north_tile;
Slope slope = GetTileSlope(cur_tile);
@@ -728,7 +728,7 @@ int AllocateSpecToStation(const StationSpec *statspec, BaseStation *st, bool exe
* @param specindex Index of the custom station within the Station's spec list.
* @return Indicates whether the StationSpec was deallocated.
*/
void DeallocateSpecFromStation(BaseStation *st, byte specindex)
void DeallocateSpecFromStation(BaseStation *st, uint8_t specindex)
{
/* specindex of 0 (default) is never freeable */
if (specindex == 0) return;