Tetris: suppress size_t warnings
This commit is contained in:
parent
7f70d98bb4
commit
13d18d071f
@ -462,7 +462,7 @@ void handleKeyDownMenu( SDL_Keycode key ) {
|
||||
case SDLK_DOWN:
|
||||
g_menu_options[g_menu_select]->unsetColor();
|
||||
g_menu_select++;
|
||||
if ( g_menu_select >= g_menu_options.size() )
|
||||
if ( static_cast<size_t>(g_menu_select) >= g_menu_options.size() )
|
||||
g_menu_select = 0;
|
||||
g_menu_options[g_menu_select]->setColor( colors["menu_item_background"] );
|
||||
break;
|
||||
@ -537,7 +537,7 @@ void handleKeyDownGameOver( SDL_Keycode key ) {
|
||||
case SDLK_DOWN:
|
||||
g_game_over_options[g_game_over_select]->unsetColor();
|
||||
g_game_over_select++;
|
||||
if ( g_game_over_select >= g_game_over_options.size() )
|
||||
if ( static_cast<size_t>(g_game_over_select) >= g_game_over_options.size() )
|
||||
g_game_over_select = 0;
|
||||
g_game_over_options[g_game_over_select]->setColor( colors["menu_item_background"] );
|
||||
break;
|
||||
@ -609,7 +609,7 @@ void handleKeyDownOptions( SDL_Keycode key ) {
|
||||
case SDLK_DOWN:
|
||||
g_options_options[g_options_select]->unsetColor();
|
||||
g_options_select++;
|
||||
if ( g_options_select >= g_options_options.size() )
|
||||
if ( static_cast<size_t>(g_options_select) >= g_options_options.size() )
|
||||
g_options_select = 0;
|
||||
g_options_options[g_options_select]->setColor( colors["menu_item_background"] );
|
||||
break;
|
||||
@ -626,7 +626,7 @@ void handleKeyDownOptions( SDL_Keycode key ) {
|
||||
switch( g_options_select ) {
|
||||
case OPTIONS_MENU_COLOR_SCHEME:
|
||||
selected_color_scheme++;
|
||||
if(selected_color_scheme >= color_schemes_names.size())
|
||||
if(static_cast<size_t>(selected_color_scheme) >= color_schemes_names.size())
|
||||
selected_color_scheme = 0;
|
||||
std::dynamic_pointer_cast<SDLPP::TextRenderer>(g_options_options[OPTIONS_MENU_COLOR_SCHEME])->changeText("Color scheme: " + color_schemes_names[selected_color_scheme]);
|
||||
g_update_colors = true;
|
||||
|
Loading…
Reference in New Issue
Block a user