diff options
author | rubidium <rubidium@openttd.org> | 2009-03-13 00:48:03 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-03-13 00:48:03 +0000 |
commit | 2adbf67968ad958c555f6bd475507e9bee4bb450 (patch) | |
tree | 2aa0dcb28c86b94945838a6d676a3dbc5406247d | |
parent | eb0d43aadd6f423fa961dd81e4fdfb49ce9e92a2 (diff) | |
download | openttd-2adbf67968ad958c555f6bd475507e9bee4bb450.tar.xz |
(svn r15697) -Fix (r15695): warning about comparing signed vs unsigned.
-rw-r--r-- | src/genworld_gui.cpp | 2 | ||||
-rw-r--r-- | src/town.h | 4 | ||||
-rw-r--r-- | src/town_cmd.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index fd9346c8f..1dcd36dc7 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -572,7 +572,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow { 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); diff --git a/src/town.h b/src/town.h index 004234cd8..9f7b3e710 100644 --- a/src/town.h +++ b/src/town.h @@ -95,8 +95,8 @@ struct BuildingCounts { 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) diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index a4a47522c..e92e39004 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1634,7 +1634,7 @@ bool GenerateTowns(TownLayout layout) { 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); |