diff options
author | Niels Martin Hansen <nielsm@indvikleren.dk> | 2018-06-10 15:36:55 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2018-06-15 22:36:55 +0200 |
commit | 836d25e738b78d1c8820ecab1f7bd90b0833ca17 (patch) | |
tree | 52cebab20848232e338640182f5e7c18a611a93f /src | |
parent | f5f2125238187eb7b8fa5c5e93a31027338ce240 (diff) | |
download | openttd-836d25e738b78d1c8820ecab1f7bd90b0833ca17.tar.xz |
Codechange: Address some MSVC compiler warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/squirrel/squirrel/sqdebug.cpp | 2 | ||||
-rw-r--r-- | src/genworld_gui.cpp | 10 | ||||
-rw-r--r-- | src/newgrf.cpp | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/3rdparty/squirrel/squirrel/sqdebug.cpp b/src/3rdparty/squirrel/squirrel/sqdebug.cpp index b163fae52..2f24e83b6 100644 --- a/src/3rdparty/squirrel/squirrel/sqdebug.cpp +++ b/src/3rdparty/squirrel/squirrel/sqdebug.cpp @@ -115,7 +115,7 @@ void SQVM::Raise_ParamTypeError(SQInteger nparam,SQInteger typemask,SQInteger ty SQInteger found = 0; for(SQInteger i=0; i<16; i++) { - SQInteger mask = 0x00000001 << i; + SQInteger mask = 0x00000001LL << i; if(typemask & (mask)) { if(found>0) StringCat(exptypes,SQString::Create(_ss(this), "|", -1), exptypes); found ++; diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index 359709e36..04eea8e66 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -288,7 +288,7 @@ static DropDownList *BuildMapsizeDropDown() for (uint i = MIN_MAP_SIZE_BITS; i <= MAX_MAP_SIZE_BITS; i++) { DropDownListParamStringItem *item = new DropDownListParamStringItem(STR_JUST_INT, i, false); - item->SetParam(0, 1 << i); + item->SetParam(0, 1LL << i); *list->Append() = item; } @@ -336,8 +336,8 @@ struct GenerateLandscapeWindow : public Window { { switch (widget) { case WID_GL_START_DATE_TEXT: SetDParam(0, ConvertYMDToDate(_settings_newgame.game_creation.starting_year, 0, 1)); break; - case WID_GL_MAPSIZE_X_PULLDOWN: SetDParam(0, 1 << _settings_newgame.game_creation.map_x); break; - case WID_GL_MAPSIZE_Y_PULLDOWN: SetDParam(0, 1 << _settings_newgame.game_creation.map_y); break; + case WID_GL_MAPSIZE_X_PULLDOWN: SetDParam(0, 1LL << _settings_newgame.game_creation.map_x); break; + case WID_GL_MAPSIZE_Y_PULLDOWN: SetDParam(0, 1LL << _settings_newgame.game_creation.map_y); break; case WID_GL_MAX_HEIGHTLEVEL_TEXT: SetDParam(0, _settings_newgame.construction.max_heightlevel); break; case WID_GL_SNOW_LEVEL_TEXT: SetDParam(0, _settings_newgame.game_creation.snow_line_height); break; @@ -896,11 +896,11 @@ struct CreateScenarioWindow : public Window break; case WID_CS_MAPSIZE_X_PULLDOWN: - SetDParam(0, 1 << _settings_newgame.game_creation.map_x); + SetDParam(0, 1LL << _settings_newgame.game_creation.map_x); break; case WID_CS_MAPSIZE_Y_PULLDOWN: - SetDParam(0, 1 << _settings_newgame.game_creation.map_y); + SetDParam(0, 1LL << _settings_newgame.game_creation.map_y); break; case WID_CS_FLAT_LAND_HEIGHT_TEXT: diff --git a/src/newgrf.cpp b/src/newgrf.cpp index d249b5e15..4cd61b95c 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -4741,7 +4741,7 @@ static void NewSpriteGroup(ByteReader *buf) } } - group->num_ranges = optimised.size(); + group->num_ranges = (uint)optimised.size(); // cast is safe, there should never be 2**31 elements here if (group->num_ranges > 0) { group->ranges = MallocT<DeterministicSpriteGroupRange>(group->num_ranges); MemCpyT(group->ranges, &optimised.front(), group->num_ranges); |