mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-16 19:19:09 +00:00
Codechange: Silence warnings about intentionally unused parameters.
This commit is contained in:
@@ -76,7 +76,7 @@ struct GraphLegendWindow : Window {
|
||||
DrawString(tr.left, tr.right, CenterBounds(tr.top, tr.bottom, FONT_HEIGHT_NORMAL), STR_COMPANY_NAME_COMPANY_NUM, HasBit(_legend_excluded_companies, cid) ? TC_BLACK : TC_WHITE);
|
||||
}
|
||||
|
||||
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 (!IsInsideMM(widget, WID_GL_FIRST_COMPANY, MAX_COMPANIES + WID_GL_FIRST_COMPANY)) return;
|
||||
|
||||
@@ -95,7 +95,7 @@ struct GraphLegendWindow : 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 (Company::IsValidID(data)) return;
|
||||
@@ -493,7 +493,7 @@ protected:
|
||||
}
|
||||
|
||||
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 != this->graph_widget) return;
|
||||
|
||||
@@ -536,12 +536,12 @@ public:
|
||||
DrawGraph(r);
|
||||
}
|
||||
|
||||
virtual OverflowSafeInt64 GetGraphData(const Company *c, int j)
|
||||
virtual OverflowSafeInt64 GetGraphData(const Company *, int)
|
||||
{
|
||||
return INVALID_DATAPOINT;
|
||||
}
|
||||
|
||||
void OnClick(Point pt, int widget, int click_count) override
|
||||
void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
|
||||
{
|
||||
/* Clicked on legend? */
|
||||
if (widget == WID_CV_KEY_BUTTON) ShowGraphLegend();
|
||||
@@ -557,7 +557,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) return;
|
||||
this->UpdateStatistics(true);
|
||||
@@ -782,7 +782,7 @@ struct PerformanceHistoryGraphWindow : BaseGraphWindow {
|
||||
return c->old_economy[j].performance_history;
|
||||
}
|
||||
|
||||
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_PHG_DETAILED_PERFORMANCE) ShowPerformanceRatingDetail();
|
||||
this->BaseGraphWindow::OnClick(pt, widget, click_count);
|
||||
@@ -916,7 +916,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
|
||||
}
|
||||
}
|
||||
|
||||
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_CPR_MATRIX) {
|
||||
BaseGraphWindow::UpdateWidgetSize(widget, size, padding, fill, resize);
|
||||
@@ -975,7 +975,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
|
||||
}
|
||||
}
|
||||
|
||||
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_CPR_ENABLE_CARGOES:
|
||||
@@ -1025,7 +1025,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
|
||||
* @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;
|
||||
this->UpdatePaymentRates();
|
||||
@@ -1142,7 +1142,7 @@ struct PerformanceRatingDetailWindow : Window {
|
||||
uint score_detail_left;
|
||||
uint score_detail_right;
|
||||
|
||||
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_PRD_SCORE_FIRST:
|
||||
@@ -1279,7 +1279,7 @@ struct PerformanceRatingDetailWindow : 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
|
||||
{
|
||||
/* Check which button is clicked */
|
||||
if (IsInsideMM(widget, WID_PRD_COMPANY_FIRST, WID_PRD_COMPANY_LAST + 1)) {
|
||||
@@ -1307,7 +1307,7 @@ struct PerformanceRatingDetailWindow : Window {
|
||||
* @param data the company ID of the company that is going to be removed
|
||||
* @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;
|
||||
/* Disable the companies who are not active */
|
||||
|
Reference in New Issue
Block a user