From f2aeed9cb929ba9b5353772254c08564a1cee027 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sat, 23 May 2026 01:18:30 +0100 Subject: [PATCH] Cleanup: Remove unused GameOptionsWindowNumber::GameSettings window number (#15617) Remove associated redundant SetWindowDirty calls --- bin/game/compat_15.nut | 2 +- src/rail_gui.cpp | 2 -- src/window_type.h | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/bin/game/compat_15.nut b/bin/game/compat_15.nut index 0684deb69b..220763df2b 100644 --- a/bin/game/compat_15.nut +++ b/bin/game/compat_15.nut @@ -17,7 +17,7 @@ GSWindow.WN_GAME_OPTIONS_GS <- GSWindow.GameOptionsWindowNumber.GS; GSWindow.WN_GAME_OPTIONS_ABOUT <- GSWindow.GameOptionsWindowNumber.About; GSWindow.WN_GAME_OPTIONS_NEWGRF_STATE <- GSWindow.GameOptionsWindowNumber.NewGRFState; GSWindow.WN_GAME_OPTIONS_GAME_OPTIONS <- GSWindow.GameOptionsWindowNumber.GameOptions; -GSWindow.WN_GAME_OPTIONS_GAME_SETTINGS <- GSWindow.GameOptionsWindowNumber.GameSettings; +GSWindow.WN_GAME_OPTIONS_GAME_SETTINGS <- GSWindow.GameOptionsWindowNumber.GameOptions; GSWindow.WN_QUERY_STRING <- GSWindow.QueryStringWindowNumber.Default; GSWindow.WN_QUERY_STRING_SIGN <- GSWindow.QueryStringWindowNumber.Sign; GSWindow.WN_CONFIRM_POPUP_QUERY <- GSWindow.ConfirmPopupQueryWindowNumber.Default; diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 51589ff857..cfc0f0ba6f 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -1641,14 +1641,12 @@ public: case WID_BS_DRAG_SIGNALS_DENSITY_DECREASE: if (_settings_client.gui.drag_signals_density > 1) { _settings_client.gui.drag_signals_density--; - SetWindowDirty(WindowClass::GameOptions, GameOptionsWindowNumber::GameSettings); } break; case WID_BS_DRAG_SIGNALS_DENSITY_INCREASE: if (_settings_client.gui.drag_signals_density < 20) { _settings_client.gui.drag_signals_density++; - SetWindowDirty(WindowClass::GameOptions, GameOptionsWindowNumber::GameSettings); } break; diff --git a/src/window_type.h b/src/window_type.h index 5da69c2e02..20e27478a6 100644 --- a/src/window_type.h +++ b/src/window_type.h @@ -30,7 +30,6 @@ enum class GameOptionsWindowNumber : uint8_t { About, ///< About window. NewGRFState, ///< NewGRF settings. GameOptions, ///< Game options. - GameSettings, ///< Game settings. }; /** Window numbers for QueryString windows. */ @@ -643,7 +642,6 @@ enum class WindowClass : uint16_t { * - #GameOptionsWindowNumber::About = #AboutWidgets * - #GameOptionsWindowNumber::NewGRFState = #NewGRFStateWidgets * - #GameOptionsWindowNumber::GameOptions = #GameOptionsWidgets - * - #GameOptionsWindowNumber::GameSettings = #GameSettingsWidgets */ GameOptions,