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:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user