Codechange: Silence warnings about intentionally unused parameters.
This commit is contained in:
@@ -884,7 +884,7 @@ struct RefitWindow : public Window {
|
||||
this->DrawWidgets();
|
||||
}
|
||||
|
||||
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_VR_MATRIX:
|
||||
@@ -1040,7 +1040,7 @@ struct RefitWindow : public 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
|
||||
{
|
||||
switch (data) {
|
||||
case VIWD_AUTOREPLACE: // Autoreplace replaced the vehicle; selected_vehicle became invalid.
|
||||
@@ -1148,7 +1148,7 @@ struct RefitWindow : public 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
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_VR_VEHICLE_PANEL_DISPLAY: { // Vehicle image.
|
||||
@@ -1870,7 +1870,7 @@ public:
|
||||
*this->sorting = this->vehgroups.GetListing();
|
||||
}
|
||||
|
||||
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_VL_LIST:
|
||||
@@ -2019,7 +2019,7 @@ public:
|
||||
this->DrawWidgets();
|
||||
}
|
||||
|
||||
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_VL_ORDER_VIEW: // Open the shared orders window
|
||||
@@ -2163,7 +2163,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 && HasBit(data, 31) && this->vli.type == VL_SHARED_ORDERS) {
|
||||
/* Needs to be done in command-scope, so everything stays valid */
|
||||
@@ -2349,7 +2349,7 @@ struct VehicleDetailsWindow : 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 (data == VIWD_AUTOREPLACE) {
|
||||
/* Autoreplace replaced the vehicle.
|
||||
@@ -2389,7 +2389,7 @@ struct VehicleDetailsWindow : Window {
|
||||
return desired_height;
|
||||
}
|
||||
|
||||
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_VD_TOP_DETAILS: {
|
||||
@@ -2626,7 +2626,7 @@ struct VehicleDetailsWindow : Window {
|
||||
this->DrawWidgets();
|
||||
}
|
||||
|
||||
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_VD_INCREASE_SERVICING_INTERVAL: // increase int
|
||||
@@ -2808,11 +2808,10 @@ static const StringID _vehicle_msg_translation_table[][4] = {
|
||||
|
||||
/**
|
||||
* This is the Callback method after attempting to start/stop a vehicle
|
||||
* @param cmd unused
|
||||
* @param result the result of the start/stop command
|
||||
* @param veh_id Vehicle ID.
|
||||
*/
|
||||
void CcStartStopVehicle(Commands cmd, const CommandCost &result, VehicleID veh_id, bool)
|
||||
void CcStartStopVehicle(Commands, const CommandCost &result, VehicleID veh_id, bool)
|
||||
{
|
||||
if (result.Failed()) return;
|
||||
|
||||
@@ -2950,7 +2949,7 @@ public:
|
||||
this->Window::Close();
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
const Vehicle *v = Vehicle::Get(this->window_number);
|
||||
switch (widget) {
|
||||
@@ -3111,7 +3110,7 @@ public:
|
||||
DrawString(tr.left, tr.right, CenterBounds(tr.top, tr.bottom, FONT_HEIGHT_NORMAL), str, text_colour, SA_HOR_CENTER);
|
||||
}
|
||||
|
||||
void OnClick(Point pt, int widget, int click_count) override
|
||||
void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
|
||||
{
|
||||
const Vehicle *v = Vehicle::Get(this->window_number);
|
||||
|
||||
@@ -3219,7 +3218,7 @@ public:
|
||||
Command<CMD_RENAME_VEHICLE>::Post(STR_ERROR_CAN_T_RENAME_TRAIN + Vehicle::Get(this->window_number)->type, this->window_number, str);
|
||||
}
|
||||
|
||||
void OnMouseOver(Point pt, int widget) override
|
||||
void OnMouseOver([[maybe_unused]] Point pt, int widget) override
|
||||
{
|
||||
bool start_stop = widget == WID_VV_START_STOP;
|
||||
if (start_stop != mouse_over_start_stop) {
|
||||
@@ -3266,7 +3265,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 (data == VIWD_AUTOREPLACE) {
|
||||
/* Autoreplace replaced the vehicle.
|
||||
@@ -3374,11 +3373,10 @@ void StopGlobalFollowVehicle(const Vehicle *v)
|
||||
|
||||
/**
|
||||
* This is the Callback method after the construction attempt of a primary vehicle
|
||||
* @param cmd unused
|
||||
* @param result indicates completion (or not) of the operation
|
||||
* @param new_veh_id ID of the new vehicle.
|
||||
*/
|
||||
void CcBuildPrimaryVehicle(Commands cmd, const CommandCost &result, VehicleID new_veh_id, uint, uint16_t, CargoArray)
|
||||
void CcBuildPrimaryVehicle(Commands, const CommandCost &result, VehicleID new_veh_id, uint, uint16_t, CargoArray)
|
||||
{
|
||||
if (result.Failed()) return;
|
||||
|
||||
|
Reference in New Issue
Block a user