Codechange: use int32_t instead of uint16_t for scroll bar position/size/capacity
(cherry picked from commit d09b5aaeba
)
# Conflicts:
# src/newgrf_debug_gui.cpp
# src/newgrf_gui.cpp
# src/widget_type.h
This commit is contained in:

committed by
Jonathan G Rennison

parent
2219b8e378
commit
5d8e40cad4
@@ -2587,7 +2587,7 @@ struct SelectStationWindow : Window {
|
||||
tr.top += this->resize.step_height;
|
||||
}
|
||||
|
||||
for (uint i = std::max<uint>(1, this->vscroll->GetPosition()); i <= _stations_nearby_list.size(); ++i, tr.top += this->resize.step_height) {
|
||||
for (int32_t i = std::max<int32_t>(1, this->vscroll->GetPosition()); (size_t)i <= _stations_nearby_list.size(); ++i, tr.top += this->resize.step_height) {
|
||||
/* Don't draw anything if it extends past the end of the window. */
|
||||
if (i - this->vscroll->GetPosition() >= this->vscroll->GetCapacity()) break;
|
||||
|
||||
|
Reference in New Issue
Block a user