1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 08:52:40 +01:00

Codechange: use accessor for (scrollbar_)index as they are read only

This commit is contained in:
Rubidium
2025-01-04 07:56:01 +01:00
committed by rubidium42
parent b653f875b0
commit bfc8ae6c52
6 changed files with 43 additions and 23 deletions

View File

@@ -1410,7 +1410,7 @@ public:
NWidgetBase *nwid = it->get();
nwid->current_x = 0; /* Hide widget, it will be revealed in the next step. */
if (nwid->type == NWID_SPACER) continue;
lookup[dynamic_cast<NWidgetCore *>(nwid)->index] = std::distance(this->children.begin(), it);
lookup[dynamic_cast<NWidgetCore *>(nwid)->GetIndex()] = std::distance(this->children.begin(), it);
}
/* Now assign the widgets to their rightful place */