Codechange: Silence warnings about intentionally unused parameters.
This commit is contained in:
@@ -98,7 +98,7 @@ static bool IsRoadStopAvailable(const RoadStopSpec *roadstopspec, StationType ty
|
||||
return Convert8bitBooleanCallback(roadstopspec->grf_prop.grffile, CBID_STATION_AVAILABILITY, cb_res);
|
||||
}
|
||||
|
||||
void CcPlaySound_CONSTRUCTION_OTHER(Commands cmd, const CommandCost &result, TileIndex tile)
|
||||
void CcPlaySound_CONSTRUCTION_OTHER(Commands, const CommandCost &result, TileIndex tile)
|
||||
{
|
||||
if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_1F_CONSTRUCTION_OTHER, tile);
|
||||
}
|
||||
@@ -121,11 +121,10 @@ static void PlaceRoad_Bridge(TileIndex tile, Window *w)
|
||||
/**
|
||||
* Callback executed after a build road tunnel command has been called.
|
||||
*
|
||||
* @param cmd unused
|
||||
* @param result Whether the build succeeded.
|
||||
* @param start_tile Starting tile of the tunnel.
|
||||
*/
|
||||
void CcBuildRoadTunnel(Commands cmd, const CommandCost &result, TileIndex start_tile)
|
||||
void CcBuildRoadTunnel(Commands, const CommandCost &result, TileIndex start_tile)
|
||||
{
|
||||
if (result.Succeeded()) {
|
||||
if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_CONSTRUCTION_OTHER, start_tile);
|
||||
@@ -158,7 +157,7 @@ void ConnectRoadToStructure(TileIndex tile, DiagDirection direction)
|
||||
}
|
||||
}
|
||||
|
||||
void CcRoadDepot(Commands cmd, const CommandCost &result, TileIndex tile, RoadType rt, DiagDirection dir)
|
||||
void CcRoadDepot(Commands, const CommandCost &result, TileIndex tile, RoadType, DiagDirection dir)
|
||||
{
|
||||
if (result.Failed()) return;
|
||||
|
||||
@@ -169,7 +168,6 @@ void CcRoadDepot(Commands cmd, const CommandCost &result, TileIndex tile, RoadTy
|
||||
|
||||
/**
|
||||
* Command callback for building road stops.
|
||||
* @param cmd Unused.
|
||||
* @param result Result of the build road stop command.
|
||||
* @param tile Start tile.
|
||||
* @param width Width of the road stop.
|
||||
@@ -180,7 +178,7 @@ void CcRoadDepot(Commands cmd, const CommandCost &result, TileIndex tile, RoadTy
|
||||
* @param spec_index Road stop spec index.
|
||||
* @see CmdBuildRoadStop
|
||||
*/
|
||||
void CcRoadStop(Commands cmd, const CommandCost &result, TileIndex tile, uint8_t width, uint8_t length, RoadStopType, bool is_drive_through,
|
||||
void CcRoadStop(Commands, const CommandCost &result, TileIndex tile, uint8_t width, uint8_t length, RoadStopType, bool is_drive_through,
|
||||
DiagDirection dir, RoadType, RoadStopClassID spec_class, uint16_t spec_index, StationID, bool)
|
||||
{
|
||||
if (result.Failed()) return;
|
||||
@@ -341,7 +339,7 @@ struct BuildRoadToolbarWindow : Window {
|
||||
* @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;
|
||||
RoadTramType rtt = GetRoadTramType(this->roadtype);
|
||||
@@ -472,7 +470,7 @@ struct BuildRoadToolbarWindow : 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
|
||||
{
|
||||
_remove_button_clicked = false;
|
||||
_one_way_button_clicked = false;
|
||||
@@ -560,7 +558,7 @@ struct BuildRoadToolbarWindow : Window {
|
||||
return Window::OnHotkey(hotkey);
|
||||
}
|
||||
|
||||
void OnPlaceObject(Point pt, TileIndex tile) override
|
||||
void OnPlaceObject([[maybe_unused]] Point pt, TileIndex tile) override
|
||||
{
|
||||
_remove_button_clicked = this->IsWidgetLowered(WID_ROT_REMOVE);
|
||||
_one_way_button_clicked = RoadTypeIsRoad(this->roadtype) ? this->IsWidgetLowered(WID_ROT_ONE_WAY) : false;
|
||||
@@ -638,7 +636,7 @@ struct BuildRoadToolbarWindow : Window {
|
||||
CloseWindowByClass(WC_BUILD_BRIDGE);
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
/* Here we update the end tile flags
|
||||
* of the road placement actions.
|
||||
@@ -677,7 +675,7 @@ struct BuildRoadToolbarWindow : 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) {
|
||||
@@ -737,7 +735,7 @@ struct BuildRoadToolbarWindow : Window {
|
||||
}
|
||||
}
|
||||
|
||||
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_ROAD, _cur_roadtype);
|
||||
VpSetPresizeRange(tile, _build_tunnel_endtile == 0 ? tile : _build_tunnel_endtile);
|
||||
@@ -1018,7 +1016,7 @@ struct BuildRoadDepotWindow : public PickerWindowBase {
|
||||
this->FinishInitNested(TRANSPORT_ROAD);
|
||||
}
|
||||
|
||||
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_BROD_DEPOT_NE, WID_BROD_DEPOT_NW + 1)) return;
|
||||
|
||||
@@ -1039,7 +1037,7 @@ struct BuildRoadDepotWindow : 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_BROD_DEPOT_NW:
|
||||
@@ -1290,7 +1288,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
@@ -1344,7 +1342,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_BROS_NEWST_LIST: {
|
||||
@@ -1492,7 +1490,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_BROS_STATION_NE:
|
||||
@@ -1570,7 +1568,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void OnRealtimeTick(uint delta_ms) override
|
||||
void OnRealtimeTick([[maybe_unused]] uint delta_ms) override
|
||||
{
|
||||
CheckRedrawStationCoverage(this);
|
||||
}
|
||||
|
Reference in New Issue
Block a user