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

@@ -589,8 +589,8 @@ struct NewGRFInspectWindow : Window {
if (nif->variables == nullptr) return;
/* Get the line, make sure it's within the boundaries. */
int line = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_NGRFI_MAINPANEL, WidgetDimensions::scaled.frametext.top);
if (line == INT_MAX) return;
int32_t line = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_NGRFI_MAINPANEL, WidgetDimensions::scaled.frametext.top);
if (line == INT32_MAX) return;
/* Find the variable related to the line */
for (const NIVariable *niv = nif->variables; niv->name != nullptr; niv++, line--) {