1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Use (const) references to widgets where possible

Note: The change from `w->widgets[WIDX_ENTRY_PRICE]` to `entryPriceWidget` is intended.
This commit is contained in:
Hielke Morsink
2021-10-01 01:15:07 +02:00
parent 317e562845
commit 6de1868ad8
14 changed files with 353 additions and 355 deletions

View File

@@ -538,8 +538,8 @@ void WindowAllWheelInput()
rct_widgetindex widgetIndex = window_find_widget_from_point(w, cursorState->position);
if (widgetIndex != -1)
{
rct_widget* widget = &w->widgets[widgetIndex];
if (widget->type == WindowWidgetType::Scroll)
const auto& widget = w->widgets[widgetIndex];
if (widget.type == WindowWidgetType::Scroll)
{
int32_t scrollIndex = WindowGetScrollIndex(w, widgetIndex);
rct_scroll* scroll = &w->scrolls[scrollIndex];