Codechange: use int32_t instead of uint16_t for scroll bar position/size/capacity

This commit is contained in:
Rubidium
2024-02-25 19:42:28 +01:00
committed by rubidium42
parent c01bf06ee1
commit d09b5aaeba
11 changed files with 57 additions and 53 deletions

View File

@@ -277,8 +277,8 @@ struct TimetableWindow : Window {
int GetOrderFromTimetableWndPt(int y, [[maybe_unused]] const Vehicle *v)
{
int sel = this->vscroll->GetScrolledRowFromWidget(y, this, WID_VT_TIMETABLE_PANEL, WidgetDimensions::scaled.framerect.top);
if (sel == INT_MAX) return INVALID_ORDER;
int32_t sel = this->vscroll->GetScrolledRowFromWidget(y, this, WID_VT_TIMETABLE_PANEL, WidgetDimensions::scaled.framerect.top);
if (sel == INT32_MAX) return INVALID_ORDER;
assert(IsInsideBS(sel, 0, v->GetNumOrders() * 2));
return sel;
}