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

@@ -184,7 +184,7 @@ public:
* @param grfid Parameter for the PSA. Only required for items with parameters.
* @return Size of the persistent storage in indices.
*/
virtual uint GetPSASize(uint index, uint32_t grfid) const
virtual uint GetPSASize([[maybe_unused]] uint index, [[maybe_unused]] uint32_t grfid) const
{
return 0;
}
@@ -195,7 +195,7 @@ public:
* @param grfid Parameter for the PSA. Only required for items with parameters.
* @return Pointer to the first position of the storage array or nullptr if not present.
*/
virtual const int32_t *GetPSAFirstPosition(uint index, uint32_t grfid) const
virtual const int32_t *GetPSAFirstPosition([[maybe_unused]] uint index, [[maybe_unused]] uint32_t grfid) const
{
return nullptr;
}
@@ -366,7 +366,7 @@ struct NewGRFInspectWindow : Window {
GetFeatureHelper(this->window_number)->SetStringParameters(this->GetFeatureIndex());
}
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_NGRFI_VEH_CHAIN: {
@@ -555,7 +555,7 @@ struct NewGRFInspectWindow : 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_NGRFI_PARENT: {
@@ -623,7 +623,7 @@ struct NewGRFInspectWindow : 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;
if (this->HasChainIndex()) {
@@ -869,7 +869,7 @@ struct SpriteAlignerWindow : 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
{
switch (widget) {
case WID_SA_SPRITE:
@@ -934,7 +934,7 @@ struct SpriteAlignerWindow : 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_SA_PREVIOUS:
@@ -1044,7 +1044,7 @@ struct SpriteAlignerWindow : 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;
if (data == 1) {