Codechange: make WindowClass a scoped enum

This commit is contained in:
Rubidium
2026-05-20 21:39:04 +02:00
committed by rubidium42
parent a9a2965131
commit bcda4a72ee
134 changed files with 1361 additions and 1249 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ ZoomLevel _saved_scrollpos_zoom;
void SaveViewportBeforeSaveGame()
{
/* Don't use GetMainWindow() in case the window does not exist. */
const Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
const Window *w = FindWindowById(WindowClass::MainWindow, 0);
if (w == nullptr || w->viewport == nullptr) {
/* Ensure saved position is clearly invalid. */
_saved_scrollpos_x = INT_MAX;