Changeset - r23025:21ca4ec349e4
[Not reviewed]
master
0 6 0
Charles Pigott - 6 years ago 2018-10-14 18:31:14
charlespigott@googlemail.com
Remove: A few bits of dead code
6 files changed with 4 insertions and 22 deletions:
0 comments (0 inline, 0 general)
src/music_gui.cpp
Show inline comments
 
@@ -589,13 +589,12 @@ struct MusicTrackSelectionWindow : publi
 
		switch (widget) {
 
			case WID_MTS_MUSICSET:
 
				ChangeMusicSet(index);
 
				break;
 
			default:
 
				NOT_REACHED();
 
				break;
 
		}
 
	}
 
};
 

	
 
static const NWidgetPart _nested_music_track_selection_widgets[] = {
 
	NWidget(NWID_HORIZONTAL),
src/news_type.h
Show inline comments
 
@@ -14,25 +14,12 @@
 

	
 
#include "core/enum_type.hpp"
 
#include "date_type.h"
 
#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.
 
 */
 
enum NewsType {
 
	NT_ARRIVAL_COMPANY, ///< First vehicle arrived for company
 
	NT_ARRIVAL_OTHER,   ///< First vehicle arrived for competitor
src/rail_cmd.cpp
Show inline comments
 
@@ -2894,17 +2894,15 @@ int TicksToLeaveDepot(const Train *v)
 
	int length = v->CalcNextVehicleOffset();
 

	
 
	switch (dir) {
 
		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
 
}
 

	
 
/**
 
 * Tile callback routine when vehicle enters tile
 
 * @see vehicle_enter_tile_proc
 
 */
src/string.cpp
Show inline comments
 
@@ -348,15 +348,14 @@ bool IsValidChar(WChar key, CharSetFilte
 
	switch (afilter) {
 
		case CS_ALPHANUMERAL:  return IsPrintable(key);
 
		case CS_NUMERAL:       return (key >= '0' && key <= '9');
 
		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
 
#if defined(_MSC_VER) && _MSC_VER < 1900
 
/**
 
 * Almost POSIX compliant implementation of \c vsnprintf for VC compiler.
src/viewport.cpp
Show inline comments
 
@@ -2442,13 +2442,12 @@ void UpdateTileSelection()
 
					}
 
					_thd.selstart.x = x1 & ~TILE_UNIT_MASK;
 
					_thd.selstart.y = y1 & ~TILE_UNIT_MASK;
 
					break;
 
				default:
 
					NOT_REACHED();
 
					break;
 
			}
 
			_thd.new_pos.x = x1 & ~TILE_UNIT_MASK;
 
			_thd.new_pos.y = y1 & ~TILE_UNIT_MASK;
 
		}
 
	}
 

	
src/water_cmd.cpp
Show inline comments
 
@@ -892,22 +892,22 @@ static void GetTileDesc_Water(TileIndex 
 
	switch (GetWaterTileType(tile)) {
 
		case WATER_TILE_CLEAR:
 
			switch (GetWaterClass(tile)) {
 
				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;
 
		case WATER_TILE_LOCK : td->str = STR_LAI_WATER_DESCRIPTION_LOCK;               break;
 
		case WATER_TILE_DEPOT:
 
			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);
 
}
 

	
 
/**
0 comments (0 inline, 0 general)