diff --git a/src/music_gui.cpp b/src/music_gui.cpp --- a/src/music_gui.cpp +++ b/src/music_gui.cpp @@ -592,7 +592,6 @@ struct MusicTrackSelectionWindow : publi break; default: NOT_REACHED(); - break; } } }; diff --git a/src/news_type.h b/src/news_type.h --- a/src/news_type.h +++ b/src/news_type.h @@ -17,19 +17,6 @@ #include "strings_type.h" #include "sound_type.h" -/** Constants in the message options window. */ -enum MessageOptionsSpace { - MOS_WIDG_PER_SETTING = 4, ///< Number of widgets needed for each news category, starting at widget #WID_MO_START_OPTION. - - MOS_LEFT_EDGE = 6, ///< Number of pixels between left edge of the window and the options buttons column. - MOS_COLUMN_SPACING = 4, ///< Number of pixels between the buttons and the description columns. - MOS_RIGHT_EDGE = 6, ///< Number of pixels between right edge of the window and the options descriptions column. - MOS_BUTTON_SPACE = 10, ///< Additional space in the button with the option value (for better looks). - - MOS_ABOVE_GLOBAL_SETTINGS = 6, ///< Number of vertical pixels between the categories and the global options. - MOS_BOTTOM_EDGE = 6, ///< Number of pixels between bottom edge of the window and bottom of the global options. -}; - /** * Type of news. */ diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -2897,11 +2897,9 @@ int TicksToLeaveDepot(const Train *v) case DIAGDIR_NE: return ((int)(v->x_pos & 0x0F) - ((_fractcoords_enter[dir] & 0x0F) - (length + 1))); case DIAGDIR_SE: return -((int)(v->y_pos & 0x0F) - ((_fractcoords_enter[dir] >> 4) + (length + 1))); case DIAGDIR_SW: return -((int)(v->x_pos & 0x0F) - ((_fractcoords_enter[dir] & 0x0F) + (length + 1))); - default: case DIAGDIR_NW: return ((int)(v->y_pos & 0x0F) - ((_fractcoords_enter[dir] >> 4) - (length + 1))); + default: NOT_REACHED(); } - - return 0; // make compilers happy } /** diff --git a/src/string.cpp b/src/string.cpp --- a/src/string.cpp +++ b/src/string.cpp @@ -351,9 +351,8 @@ bool IsValidChar(WChar key, CharSetFilte case CS_NUMERAL_SPACE: return (key >= '0' && key <= '9') || key == ' '; case CS_ALPHA: return IsPrintable(key) && !(key >= '0' && key <= '9'); case CS_HEXADECIMAL: return (key >= '0' && key <= '9') || (key >= 'a' && key <= 'f') || (key >= 'A' && key <= 'F'); + default: NOT_REACHED(); } - - return false; } #ifdef WIN32 diff --git a/src/viewport.cpp b/src/viewport.cpp --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -2445,7 +2445,6 @@ void UpdateTileSelection() break; default: NOT_REACHED(); - break; } _thd.new_pos.x = x1 & ~TILE_UNIT_MASK; _thd.new_pos.y = y1 & ~TILE_UNIT_MASK; diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -895,7 +895,7 @@ static void GetTileDesc_Water(TileIndex case WATER_CLASS_SEA: td->str = STR_LAI_WATER_DESCRIPTION_WATER; break; case WATER_CLASS_CANAL: td->str = STR_LAI_WATER_DESCRIPTION_CANAL; break; case WATER_CLASS_RIVER: td->str = STR_LAI_WATER_DESCRIPTION_RIVER; break; - default: NOT_REACHED(); break; + default: NOT_REACHED(); } break; case WATER_TILE_COAST: td->str = STR_LAI_WATER_DESCRIPTION_COAST_OR_RIVERBANK; break; @@ -904,7 +904,7 @@ static void GetTileDesc_Water(TileIndex td->str = STR_LAI_WATER_DESCRIPTION_SHIP_DEPOT; td->build_date = Depot::GetByTile(tile)->build_date; break; - default: NOT_REACHED(); break; + default: NOT_REACHED(); } td->owner[0] = GetTileOwner(tile);