diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cargopacket.cpp | 2 | ||||
-rw-r--r-- | src/economy.cpp | 2 | ||||
-rw-r--r-- | src/genworld_gui.cpp | 4 | ||||
-rw-r--r-- | src/newgrf_industries.cpp | 4 | ||||
-rw-r--r-- | src/roadveh_cmd.cpp | 2 | ||||
-rw-r--r-- | src/timetable_gui.cpp | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/src/cargopacket.cpp b/src/cargopacket.cpp index b743ebd16..244463977 100644 --- a/src/cargopacket.cpp +++ b/src/cargopacket.cpp @@ -242,7 +242,7 @@ bool CargoList::MoveTo(CargoList *dest, uint count, CargoList::MoveToAction mta, if (mta == MTA_FINAL_DELIVERY && !tmp.Empty()) { /* There are some packets that could not be delivered at the station, put them back */ - tmp.MoveTo(this, MAX_UVALUE(uint)); + tmp.MoveTo(this, UINT_MAX); tmp.packets.clear(); } diff --git a/src/economy.cpp b/src/economy.cpp index 5a913fb39..4e9d85c9b 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -324,7 +324,7 @@ void ChangeOwnershipOfPlayerItems(PlayerID old_player, PlayerID new_player) * removing his/her property doesn't fail because of lack of money. * Not too drastically though, because it could overflow */ if (new_player == PLAYER_SPECTATOR) { - GetPlayer(old_player)->player_money = MAX_UVALUE(uint64) >> 2; // jackpot ;p + GetPlayer(old_player)->player_money = UINT64_MAX >> 2; // jackpot ;p } if (new_player == PLAYER_SPECTATOR) { diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index e080973f8..bb15a9327 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -473,11 +473,11 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow { EventState state; this->HandleEditBoxKey(GLAND_RANDOM_EDITBOX, key, keycode, state); /* the seed is unsigned, therefore atoi cannot be used. - * As 2^32 - 1 (MAX_UVALUE(uint32)) is a 'magic' value + * As 2^32 - 1 (UINT32_MAX) is a 'magic' value * (use random seed) it should not be possible to be * entered into the input field; the generate seed * button can be used instead. */ - _settings_newgame.game_creation.generation_seed = minu(strtoul(this->edit_str_buf, NULL, 10), MAX_UVALUE(uint32) - 1); + _settings_newgame.game_creation.generation_seed = minu(strtoul(this->edit_str_buf, NULL, 10), UINT32_MAX - 1); return state; } diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index 666cd0ffb..737dfee5a 100644 --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -135,7 +135,7 @@ uint32 GetIndustryIDAtOffset(TileIndex tile, const Industry *i) static uint32 GetClosestIndustry(TileIndex tile, IndustryType type, const Industry *current) { - uint32 best_dist = MAX_UVALUE(uint32); + uint32 best_dist = UINT32_MAX; const Industry *i; FOR_ALL_INDUSTRIES(i) { if (i->type != type || i == current) continue; @@ -158,7 +158,7 @@ static uint32 GetCountAndDistanceOfClosestInstance(byte param_setID, byte layout { uint32 GrfID = GetRegister(0x100); ///< Get the GRFID of the definition to look for in register 100h IndustryType ind_index; - uint32 closest_dist = MAX_UVALUE(uint32); + uint32 closest_dist = UINT32_MAX; byte count = 0; /* Determine what will be the industry type to look for */ diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 8280b2570..573182133 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -727,7 +727,7 @@ TileIndex RoadVehicle::GetOrderStationLocation(StationID station) TileIndex dest = INVALID_TILE; const RoadStop *rs = GetStation(station)->GetPrimaryRoadStop(this); if (rs != NULL) { - uint mindist = MAX_UVALUE(uint); + uint mindist = UINT_MAX; for (; rs != NULL; rs = rs->GetNextRoadStop(this)) { uint dist = DistanceManhattan(this->tile, rs->xy); diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index e558124f4..3f255c1aa 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -261,7 +261,7 @@ struct TimetableWindow : Window { uint64 time = StrEmpty(str) ? 0 : strtoul(str, NULL, 10); if (!_settings_client.gui.timetable_in_ticks) time *= DAY_TICKS; - uint32 p2 = minu(time, MAX_UVALUE(uint16)); + uint32 p2 = minu(time, UINT16_MAX); DoCommandP(0, p1, p2, NULL, CMD_CHANGE_TIMETABLE | CMD_MSG(STR_CAN_T_TIMETABLE_VEHICLE)); } |