Codechange: Silence warnings about intentionally unused parameters.

This commit is contained in:
frosch
2023-09-16 22:20:53 +02:00
committed by frosch
parent df400ef84a
commit b6c8f301be
227 changed files with 972 additions and 1039 deletions

View File

@@ -154,7 +154,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_BT_TYPE_BUTTON_FIRST) {
/* Ensure tree type buttons are sized after the largest tree type */
@@ -173,7 +173,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_BT_TYPE_RANDOM: // tree of random type.
@@ -214,7 +214,7 @@ public:
}
}
void OnPlaceObject(Point pt, TileIndex tile) override
void OnPlaceObject([[maybe_unused]] Point pt, TileIndex tile) override
{
if (_game_mode != GM_EDITOR && this->mode == PM_NORMAL) {
VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_PLANT_TREES);
@@ -223,7 +223,7 @@ public:
}
}
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
{
if (_game_mode != GM_EDITOR && this->mode == PM_NORMAL) {
VpSelectTilesWithMethod(pt.x, pt.y, select_method);
@@ -238,7 +238,7 @@ public:
}
}
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 (_game_mode != GM_EDITOR && this->mode == PM_NORMAL && pt.x != -1 && select_proc == DDSP_PLANT_TREES) {
Command<CMD_PLANT_TREE>::Post(STR_ERROR_CAN_T_PLANT_TREE_HERE, end_tile, start_tile, this->tree_to_plant, _ctrl_pressed);