Codechange: Silence warnings about intentionally unused parameters.
This commit is contained in:
@@ -89,7 +89,7 @@ static bool IsStationAvailable(const StationSpec *statspec)
|
||||
return Convert8bitBooleanCallback(statspec->grf_prop.grffile, CBID_STATION_AVAILABILITY, cb_res);
|
||||
}
|
||||
|
||||
void CcPlaySound_CONSTRUCTION_RAIL(Commands cmd, const CommandCost &result, TileIndex tile)
|
||||
void CcPlaySound_CONSTRUCTION_RAIL(Commands, const CommandCost &result, TileIndex tile)
|
||||
{
|
||||
if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_20_CONSTRUCTION_RAIL, tile);
|
||||
}
|
||||
@@ -135,7 +135,7 @@ static const DiagDirection _place_depot_extra_dir[12] = {
|
||||
DIAGDIR_NW, DIAGDIR_NE, DIAGDIR_NW, DIAGDIR_NE,
|
||||
};
|
||||
|
||||
void CcRailDepot(Commands cmd, const CommandCost &result, TileIndex tile, RailType rt, DiagDirection dir)
|
||||
void CcRailDepot(Commands, const CommandCost &result, TileIndex tile, RailType, DiagDirection dir)
|
||||
{
|
||||
if (result.Failed()) return;
|
||||
|
||||
@@ -174,7 +174,7 @@ static void PlaceRail_Waypoint(TileIndex tile)
|
||||
}
|
||||
}
|
||||
|
||||
void CcStation(Commands cmd, const CommandCost &result, TileIndex tile)
|
||||
void CcStation(Commands, const CommandCost &result, TileIndex tile)
|
||||
{
|
||||
if (result.Failed()) return;
|
||||
|
||||
@@ -273,7 +273,7 @@ static void PlaceRail_Bridge(TileIndex tile, Window *w)
|
||||
}
|
||||
|
||||
/** Command callback for building a tunnel */
|
||||
void CcBuildRailTunnel(Commands cmd, const CommandCost &result, TileIndex tile)
|
||||
void CcBuildRailTunnel(Commands, const CommandCost &result, TileIndex tile)
|
||||
{
|
||||
if (result.Succeeded()) {
|
||||
if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_CONSTRUCTION_RAIL, tile);
|
||||
@@ -502,7 +502,7 @@ struct BuildRailToolbarWindow : Window {
|
||||
}
|
||||
}
|
||||
|
||||
void OnClick(Point pt, int widget, int click_count) override
|
||||
void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
|
||||
{
|
||||
if (widget < WID_RAT_BUILD_NS) return;
|
||||
|
||||
@@ -599,7 +599,7 @@ struct BuildRailToolbarWindow : Window {
|
||||
return Window::OnHotkey(hotkey);
|
||||
}
|
||||
|
||||
void OnPlaceObject(Point pt, TileIndex tile) override
|
||||
void OnPlaceObject([[maybe_unused]] Point pt, TileIndex tile) override
|
||||
{
|
||||
switch (this->last_user_action) {
|
||||
case WID_RAT_BUILD_NS:
|
||||
@@ -658,7 +658,7 @@ struct BuildRailToolbarWindow : Window {
|
||||
}
|
||||
}
|
||||
|
||||
void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt) override
|
||||
void OnPlaceDrag(ViewportPlaceMethod select_method, [[maybe_unused]] ViewportDragDropSelectionProcess select_proc, [[maybe_unused]] Point pt) override
|
||||
{
|
||||
/* no dragging if you have pressed the convert button */
|
||||
if (FindWindowById(WC_BUILD_SIGNAL, 0) != nullptr && _convert_signal_button && this->IsWidgetLowered(WID_RAT_BUILD_SIGNALS)) return;
|
||||
@@ -666,7 +666,7 @@ struct BuildRailToolbarWindow : Window {
|
||||
VpSelectTilesWithMethod(pt.x, pt.y, select_method);
|
||||
}
|
||||
|
||||
void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile) override
|
||||
void OnPlaceMouseUp([[maybe_unused]] ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, [[maybe_unused]] Point pt, TileIndex start_tile, TileIndex end_tile) override
|
||||
{
|
||||
if (pt.x != -1) {
|
||||
switch (select_proc) {
|
||||
@@ -746,7 +746,7 @@ struct BuildRailToolbarWindow : Window {
|
||||
CloseWindowByClass(WC_BUILD_BRIDGE);
|
||||
}
|
||||
|
||||
void OnPlacePresize(Point pt, TileIndex tile) override
|
||||
void OnPlacePresize([[maybe_unused]] Point pt, TileIndex tile) override
|
||||
{
|
||||
Command<CMD_BUILD_TUNNEL>::Do(DC_AUTO, tile, TRANSPORT_RAIL, _cur_railtype);
|
||||
VpSetPresizeRange(tile, _build_tunnel_endtile == 0 ? tile : _build_tunnel_endtile);
|
||||
@@ -759,7 +759,7 @@ struct BuildRailToolbarWindow : Window {
|
||||
return ES_NOT_HANDLED;
|
||||
}
|
||||
|
||||
void OnRealtimeTick(uint delta_ms) override
|
||||
void OnRealtimeTick([[maybe_unused]] uint delta_ms) override
|
||||
{
|
||||
if (this->IsWidgetLowered(WID_RAT_BUILD_WAYPOINT)) CheckRedrawWaypointCoverage(this);
|
||||
}
|
||||
@@ -1105,7 +1105,7 @@ public:
|
||||
_railstation.station_class = station_class;
|
||||
}
|
||||
|
||||
void OnInvalidateData(int data = 0, bool gui_scope = true) override
|
||||
void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
|
||||
{
|
||||
if (!gui_scope) return;
|
||||
|
||||
@@ -1183,7 +1183,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
|
||||
void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_BRAS_NEWST_LIST: {
|
||||
@@ -1320,7 +1320,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void OnClick(Point pt, int widget, int click_count) override
|
||||
void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
|
||||
{
|
||||
switch (GB(widget, 0, 16)) {
|
||||
case WID_BRAS_PLATFORM_DIR_X:
|
||||
@@ -1487,7 +1487,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void OnRealtimeTick(uint delta_ms) override
|
||||
void OnRealtimeTick([[maybe_unused]] uint delta_ms) override
|
||||
{
|
||||
CheckRedrawStationCoverage(this);
|
||||
}
|
||||
@@ -1718,7 +1718,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
|
||||
void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
|
||||
{
|
||||
if (widget == WID_BS_DRAG_SIGNALS_DENSITY_LABEL) {
|
||||
/* Two digits for signals density. */
|
||||
@@ -1752,7 +1752,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void OnClick(Point pt, int widget, int click_count) override
|
||||
void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_BS_SEMAPHORE_NORM:
|
||||
@@ -1818,7 +1818,7 @@ public:
|
||||
* @param data Information about the changed data.
|
||||
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
|
||||
*/
|
||||
void OnInvalidateData(int data = 0, bool gui_scope = true) override
|
||||
void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
|
||||
{
|
||||
if (!gui_scope) return;
|
||||
this->LowerWidget((_cur_signal_variant == SIG_ELECTRIC ? WID_BS_ELECTRIC_NORM : WID_BS_SEMAPHORE_NORM) + _cur_signal_type);
|
||||
@@ -1907,7 +1907,7 @@ struct BuildRailDepotWindow : public PickerWindowBase {
|
||||
this->LowerWidget(_build_depot_direction + WID_BRAD_DEPOT_NE);
|
||||
}
|
||||
|
||||
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
|
||||
void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
|
||||
{
|
||||
if (!IsInsideMM(widget, WID_BRAD_DEPOT_NE, WID_BRAD_DEPOT_NW + 1)) return;
|
||||
|
||||
@@ -1928,7 +1928,7 @@ struct BuildRailDepotWindow : public PickerWindowBase {
|
||||
}
|
||||
}
|
||||
|
||||
void OnClick(Point pt, int widget, int click_count) override
|
||||
void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_BRAD_DEPOT_NE:
|
||||
@@ -2072,7 +2072,7 @@ struct BuildRailWaypointWindow : PickerWindowBase {
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
|
||||
void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_BRW_WAYPOINT_MATRIX:
|
||||
@@ -2135,7 +2135,7 @@ struct BuildRailWaypointWindow : PickerWindowBase {
|
||||
}
|
||||
}
|
||||
|
||||
void OnClick(Point pt, int widget, int click_count) override
|
||||
void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
|
||||
{
|
||||
switch (GB(widget, 0, 16)) {
|
||||
case WID_BRW_WAYPOINT: {
|
||||
@@ -2156,7 +2156,7 @@ struct BuildRailWaypointWindow : PickerWindowBase {
|
||||
}
|
||||
}
|
||||
|
||||
void OnInvalidateData(int data = 0, bool gui_scope = true) override
|
||||
void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
|
||||
{
|
||||
if (!gui_scope) return;
|
||||
this->list.ForceRebuild();
|
||||
@@ -2170,7 +2170,7 @@ struct BuildRailWaypointWindow : PickerWindowBase {
|
||||
}
|
||||
}
|
||||
|
||||
void OnRealtimeTick(uint delta_ms) override
|
||||
void OnRealtimeTick([[maybe_unused]] uint delta_ms) override
|
||||
{
|
||||
CheckRedrawWaypointCoverage(this);
|
||||
}
|
||||
@@ -2291,9 +2291,8 @@ static void SetDefaultRailGui()
|
||||
/**
|
||||
* Updates the current signal variant used in the signal GUI
|
||||
* to the one adequate to current year.
|
||||
* @param new_value needed to be called when a setting changes
|
||||
*/
|
||||
void ResetSignalVariant(int32_t new_value)
|
||||
void ResetSignalVariant(int32_t)
|
||||
{
|
||||
SignalVariant new_variant = (TimerGameCalendar::year < _settings_client.gui.semaphore_build_before ? SIG_SEMAPHORE : SIG_ELECTRIC);
|
||||
|
||||
|
Reference in New Issue
Block a user