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

@@ -44,7 +44,7 @@
#include "safeguards.h"
void CcTerraform(Commands cmd, const CommandCost &result, Money, TileIndex tile)
void CcTerraform(Commands, const CommandCost &result, Money, TileIndex tile)
{
if (result.Succeeded()) {
if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_CONSTRUCTION_OTHER, tile);
@@ -175,7 +175,7 @@ struct TerraformToolbarWindow : Window {
show_object->SetDisplayedPlane(ObjectClass::GetUIClassCount() != 0 ? 0 : SZSP_NONE);
}
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_TT_BUTTONS_START) return;
@@ -222,7 +222,7 @@ struct TerraformToolbarWindow : Window {
}
}
void OnPlaceObject(Point pt, TileIndex tile) override
void OnPlaceObject([[maybe_unused]] Point pt, TileIndex tile) override
{
switch (this->last_user_action) {
case WID_TT_LOWER_LAND: // Lower land button
@@ -253,19 +253,19 @@ struct TerraformToolbarWindow : 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
{
VpSelectTilesWithMethod(pt.x, pt.y, select_method);
}
Point OnInitialPosition(int16_t sm_width, int16_t sm_height, int window_number) override
Point OnInitialPosition([[maybe_unused]] int16_t sm_width, [[maybe_unused]] int16_t sm_height, [[maybe_unused]] int window_number) override
{
Point pt = GetToolbarAlignedWindowPosition(sm_width);
pt.y += sm_height;
return pt;
}
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) {
@@ -500,10 +500,9 @@ static const NWidgetPart _nested_scen_edit_land_gen_widgets[] = {
/**
* Callback function for the scenario editor 'reset landscape' confirmation window
* @param w Window unused
* @param confirmed boolean value, true when yes was clicked, false otherwise
*/
static void ResetLandscapeConfirmationCallback(Window *w, bool confirmed)
static void ResetLandscapeConfirmationCallback(Window *, bool confirmed)
{
if (confirmed) {
/* Set generating_world to true to get instant-green grass after removing
@@ -554,7 +553,7 @@ struct ScenarioEditorLandscapeGenerationWindow : Window {
}
}
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_ETT_DOTS) return;
@@ -579,7 +578,7 @@ struct ScenarioEditorLandscapeGenerationWindow : Window {
} while (--n);
}
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_ETT_BUTTONS_START) return;
@@ -653,7 +652,7 @@ struct ScenarioEditorLandscapeGenerationWindow : Window {
}
}
void OnPlaceObject(Point pt, TileIndex tile) override
void OnPlaceObject([[maybe_unused]] Point pt, TileIndex tile) override
{
switch (this->last_user_action) {
case WID_ETT_DEMOLISH: // Demolish aka dynamite button
@@ -684,12 +683,12 @@ struct ScenarioEditorLandscapeGenerationWindow : 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
{
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) {