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

@@ -56,7 +56,7 @@ public:
ResizeWindow(this, _screen.width, _screen.height);
}
void DrawWidget(const Rect &r, int widget) const override
void DrawWidget(const Rect &r, int) const override
{
GfxFillRect(r.left, r.top, r.right, r.bottom, 4, FILLRECT_OPAQUE);
GfxFillRect(r.left, r.top, r.right, r.bottom, 0, FILLRECT_CHECKER);
@@ -98,7 +98,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
{
if (widget == WID_BEM_MESSAGE) {
*size = GetStringBoundingBox(STR_MISSING_GRAPHICS_ERROR);
@@ -114,7 +114,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
{
if (widget == WID_BEM_QUIT) {
_exit_game = true;
@@ -159,7 +159,7 @@ public:
this->BaseNetworkContentDownloadStatusWindow::Close();
}
void OnDownloadComplete(ContentID cid) override
void OnDownloadComplete(ContentID) override
{
/* We have completed downloading. We can trigger finding the right set now. */
BaseGraphics::FindSets();
@@ -214,7 +214,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
{
/* We cache the button size. This is safe as no reinit can happen here. */
if (this->button_size.width == 0) {
@@ -244,7 +244,7 @@ public:
DrawStringMultiLine(r.Shrink(WidgetDimensions::scaled.frametext), STR_MISSING_GRAPHICS_SET_MESSAGE, TC_FROMSTRING, SA_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
{
switch (widget) {
case WID_BAFD_YES:
@@ -334,7 +334,7 @@ public:
EM_ASM({ if (window["openttd_bootstrap"]) openttd_bootstrap($0, $1); }, this->downloaded_bytes, this->total_bytes);
}
void OnDownloadProgress(const ContentInfo *ci, int bytes) override
void OnDownloadProgress(const ContentInfo *, int bytes) override
{
/* A negative value means we are resetting; for example, when retrying or using a fallback. */
if (bytes < 0) {
@@ -346,7 +346,7 @@ public:
EM_ASM({ if (window["openttd_bootstrap"]) openttd_bootstrap($0, $1); }, this->downloaded_bytes, this->total_bytes);
}
void OnDownloadComplete(ContentID cid) override
void OnDownloadComplete(ContentID) override
{
/* _exit_game is used to break out of the outer video driver's MainLoop. */
_exit_game = true;