Remove: A few bits of dead code

This commit is contained in:
Charles Pigott 2018-10-14 19:31:14 +01:00 committed by frosch
parent e0c0394e37
commit 52ed3bcbaa
6 changed files with 4 additions and 22 deletions

View File

@ -592,7 +592,6 @@ struct MusicTrackSelectionWindow : public Window {
break; break;
default: default:
NOT_REACHED(); NOT_REACHED();
break;
} }
} }
}; };

View File

@ -17,19 +17,6 @@
#include "strings_type.h" #include "strings_type.h"
#include "sound_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. * Type of news.
*/ */

View File

@ -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_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_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))); 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))); case DIAGDIR_NW: return ((int)(v->y_pos & 0x0F) - ((_fractcoords_enter[dir] >> 4) - (length + 1)));
default: NOT_REACHED();
} }
return 0; // make compilers happy
} }
/** /**

View File

@ -351,9 +351,8 @@ bool IsValidChar(WChar key, CharSetFilter afilter)
case CS_NUMERAL_SPACE: return (key >= '0' && key <= '9') || key == ' '; case CS_NUMERAL_SPACE: return (key >= '0' && key <= '9') || key == ' ';
case CS_ALPHA: return IsPrintable(key) && !(key >= '0' && key <= '9'); 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'); case CS_HEXADECIMAL: return (key >= '0' && key <= '9') || (key >= 'a' && key <= 'f') || (key >= 'A' && key <= 'F');
default: NOT_REACHED();
} }
return false;
} }
#ifdef WIN32 #ifdef WIN32

View File

@ -2445,7 +2445,6 @@ void UpdateTileSelection()
break; break;
default: default:
NOT_REACHED(); NOT_REACHED();
break;
} }
_thd.new_pos.x = x1 & ~TILE_UNIT_MASK; _thd.new_pos.x = x1 & ~TILE_UNIT_MASK;
_thd.new_pos.y = y1 & ~TILE_UNIT_MASK; _thd.new_pos.y = y1 & ~TILE_UNIT_MASK;

View File

@ -895,7 +895,7 @@ static void GetTileDesc_Water(TileIndex tile, TileDesc *td)
case WATER_CLASS_SEA: td->str = STR_LAI_WATER_DESCRIPTION_WATER; break; 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_CANAL: td->str = STR_LAI_WATER_DESCRIPTION_CANAL; break;
case WATER_CLASS_RIVER: td->str = STR_LAI_WATER_DESCRIPTION_RIVER; break; case WATER_CLASS_RIVER: td->str = STR_LAI_WATER_DESCRIPTION_RIVER; break;
default: NOT_REACHED(); break; default: NOT_REACHED();
} }
break; break;
case WATER_TILE_COAST: td->str = STR_LAI_WATER_DESCRIPTION_COAST_OR_RIVERBANK; break; case WATER_TILE_COAST: td->str = STR_LAI_WATER_DESCRIPTION_COAST_OR_RIVERBANK; break;
@ -904,7 +904,7 @@ static void GetTileDesc_Water(TileIndex tile, TileDesc *td)
td->str = STR_LAI_WATER_DESCRIPTION_SHIP_DEPOT; td->str = STR_LAI_WATER_DESCRIPTION_SHIP_DEPOT;
td->build_date = Depot::GetByTile(tile)->build_date; td->build_date = Depot::GetByTile(tile)->build_date;
break; break;
default: NOT_REACHED(); break; default: NOT_REACHED();
} }
td->owner[0] = GetTileOwner(tile); td->owner[0] = GetTileOwner(tile);