Mercurial > hg > openttd
changeset 11347:8656dc2695e9 draft
(svn r15697) -Fix (r15695): warning about comparing signed vs unsigned.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Fri, 13 Mar 2009 00:48:03 +0000 |
parents | 1b8ff09217a8 |
children | abce84d4f0da |
files | src/genworld_gui.cpp src/town.h src/town_cmd.cpp |
diffstat | 3 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -572,7 +572,7 @@ case GLAND_SMOOTHNESS_PULLDOWN: _settings_newgame.game_creation.tgen_smoothness = index; break; case GLAND_TOWN_PULLDOWN: - if (index == CUSTOM_TOWN_NUMBER_DIFFICULTY) { + if ((uint)index == CUSTOM_TOWN_NUMBER_DIFFICULTY) { this->widget_id = widget; SetDParam(0, _settings_newgame.game_creation.custom_town_number); ShowQueryString(STR_CONFIG_SETTING_INT32, STR_NUMBER_OF_TOWNS, 5, 50, this, CS_NUMERAL, QSF_NONE);
--- a/src/town.h +++ b/src/town.h @@ -95,8 +95,8 @@ uint8 class_count[HOUSE_CLASS_MAX]; }; -static const int CUSTOM_TOWN_NUMBER_DIFFICULTY = 4; ///< value for custom town number in difficulty settings -static const int CUSTOM_TOWN_MAX_NUMBER = 5000; ///< this is the maximum number of towns a user can specify in customisation +static const uint CUSTOM_TOWN_NUMBER_DIFFICULTY = 4; ///< value for custom town number in difficulty settings +static const uint CUSTOM_TOWN_MAX_NUMBER = 5000; ///< this is the maximum number of towns a user can specify in customisation DECLARE_OLD_POOL(Town, Town, 3, 8000)
--- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1634,7 +1634,7 @@ { uint num = 0; uint difficulty = _settings_game.difficulty.number_towns; - uint n = difficulty == CUSTOM_TOWN_NUMBER_DIFFICULTY ? _settings_game.game_creation.custom_town_number : ScaleByMapSize(_num_initial_towns[difficulty] + (Random() & 7)); + uint n = (difficulty == (uint)CUSTOM_TOWN_NUMBER_DIFFICULTY) ? _settings_game.game_creation.custom_town_number : ScaleByMapSize(_num_initial_towns[difficulty] + (Random() & 7)); uint num_cities = _settings_game.economy.larger_towns == 0 ? 0 : n / _settings_game.economy.larger_towns; SetGeneratingWorldProgress(GWP_TOWN, n);