Adding of _t to (u)int types, and WChar to char32_t

See: eaae0bb5e
This commit is contained in:
Jonathan G Rennison
2024-01-07 16:41:53 +00:00
parent 55d78a23be
commit 97e6f3062e
655 changed files with 7555 additions and 7555 deletions

View File

@@ -37,7 +37,7 @@ INSTANTIATE_POOL_METHODS(Group)
GroupStatistics::GroupStatistics()
{
this->num_engines = CallocT<uint16>(Engine::GetPoolSize());
this->num_engines = CallocT<uint16_t>(Engine::GetPoolSize());
}
GroupStatistics::~GroupStatistics()
@@ -57,7 +57,7 @@ void GroupStatistics::Clear()
/* This is also called when NewGRF change. So the number of engines might have changed. Reallocate. */
free(this->num_engines);
this->num_engines = CallocT<uint16>(Engine::GetPoolSize());
this->num_engines = CallocT<uint16_t>(Engine::GetPoolSize());
}
/**
@@ -409,7 +409,7 @@ Group::Group(Owner owner)
* @param text unused
* @return the cost of this operation or an error
*/
CommandCost CmdCreateGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
CommandCost CmdCreateGroup(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
{
VehicleType vt = Extract<VehicleType, 0, 3>(p1);
if (!IsCompanyBuildableVehicleType(vt)) return CMD_ERROR;
@@ -461,7 +461,7 @@ CommandCost CmdCreateGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
* @param text unused
* @return the cost of this operation or an error
*/
CommandCost CmdDeleteGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
CommandCost CmdDeleteGroup(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
{
Group *g = Group::GetIfValid(p1);
if (g == nullptr || g->owner != _current_company) return CMD_ERROR;
@@ -522,7 +522,7 @@ CommandCost CmdDeleteGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
* @param text the new name or an empty string when resetting to the default
* @return the cost of this operation or an error
*/
CommandCost CmdAlterGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
CommandCost CmdAlterGroup(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
{
Group *g = Group::GetIfValid(GB(p1, 0, 16));
if (g == nullptr || g->owner != _current_company) return CMD_ERROR;
@@ -595,7 +595,7 @@ CommandCost CmdAlterGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
* @param text the new name or an empty string when setting to the default
* @return the cost of this operation or an error
*/
CommandCost CmdCreateGroupFromList(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
CommandCost CmdCreateGroupFromList(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
{
VehicleListIdentifier vli;
VehicleList list;
@@ -676,7 +676,7 @@ static void AddVehicleToGroup(Vehicle *v, GroupID new_g)
* @param text unused
* @return the cost of this operation or an error
*/
CommandCost CmdAddVehicleGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
CommandCost CmdAddVehicleGroup(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
{
Vehicle *v = Vehicle::GetIfValid(GB(p2, 0, 20));
GroupID new_g = p1;
@@ -813,7 +813,7 @@ std::string GenerateAutoNameForVehicleGroup(const Vehicle *v)
* @param text unused
* @return the cost of this operation or an error
*/
CommandCost CmdAddSharedVehicleGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
CommandCost CmdAddSharedVehicleGroup(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
{
VehicleType type = Extract<VehicleType, 0, 3>(p2);
GroupID id_g = p1;
@@ -850,7 +850,7 @@ CommandCost CmdAddSharedVehicleGroup(TileIndex tile, DoCommandFlag flags, uint32
* @param text unused
* @return the cost of this operation or an error
*/
CommandCost CmdRemoveAllVehiclesGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
CommandCost CmdRemoveAllVehiclesGroup(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
{
GroupID old_g = p1;
Group *g = Group::GetIfValid(old_g);
@@ -884,7 +884,7 @@ CommandCost CmdRemoveAllVehiclesGroup(TileIndex tile, DoCommandFlag flags, uint3
* - p2 bit 8 Set secondary instead of primary colour
* - p2 bit 16-23 Colour.
*/
CommandCost CmdSetGroupLivery(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
CommandCost CmdSetGroupLivery(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
{
Group *g = Group::GetIfValid(p1);
bool primary = !HasBit(p2, 8);
@@ -945,7 +945,7 @@ static void SetGroupFlag(Group *g, GroupFlags flag, bool set, bool children)
* @param text unused
* @return the cost of this operation or an error
*/
CommandCost CmdSetGroupFlag(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
CommandCost CmdSetGroupFlag(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
{
Group *g = Group::GetIfValid(GB(p1, 0, 16));
if (g == nullptr || g->owner != _current_company) return CMD_ERROR;