summaryrefslogtreecommitdiff
path: root/src/autoreplace_gui.cpp
diff options
context:
space:
mode:
authorglx22 <glx22@users.noreply.github.com>2019-03-28 00:09:33 +0100
committerGitHub <noreply@github.com>2019-03-28 00:09:33 +0100
commit66dd7c3879123bb99b712375b66b577f81d53a96 (patch)
tree6231635658dab5ba63b776e9350884c083617cb1 /src/autoreplace_gui.cpp
parente817951bfdc229b404d5fec188c67f5202a0e774 (diff)
downloadopenttd-66dd7c3879123bb99b712375b66b577f81d53a96.tar.xz
Fix: MSVC warnings (#7423)
Diffstat (limited to 'src/autoreplace_gui.cpp')
-rw-r--r--src/autoreplace_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp
index 133e9fb38..78c2fdc31 100644
--- a/src/autoreplace_gui.cpp
+++ b/src/autoreplace_gui.cpp
@@ -160,7 +160,7 @@ class ReplaceVehicleWindow : public Window {
if (this->engines[0].NeedRebuild()) {
/* We need to rebuild the left engines list */
this->GenerateReplaceVehList(true);
- this->vscroll[0]->SetCount(this->engines[0].size());
+ this->vscroll[0]->SetCount((uint)this->engines[0].size());
if (this->reset_sel_engine && this->sel_engine[0] == INVALID_ENGINE && this->engines[0].size() != 0) {
this->sel_engine[0] = this->engines[0][0];
}
@@ -180,7 +180,7 @@ class ReplaceVehicleWindow : public Window {
}
/* Regenerate the list on the right. Note: This resets sel_engine[1] to INVALID_ENGINE, if it is no longer available. */
this->GenerateReplaceVehList(false);
- this->vscroll[1]->SetCount(this->engines[1].size());
+ this->vscroll[1]->SetCount((uint)this->engines[1].size());
if (this->reset_sel_engine && this->sel_engine[1] != INVALID_ENGINE) {
int position = 0;
for (EngineID &eid : this->engines[1]) {
@@ -384,7 +384,7 @@ public:
case WID_RV_RIGHT_MATRIX: {
int side = (widget == WID_RV_LEFT_MATRIX) ? 0 : 1;
EngineID start = this->vscroll[side]->GetPosition(); // what is the offset for the start (scrolling)
- EngineID end = min(this->vscroll[side]->GetCapacity() + start, this->engines[side].size());
+ EngineID end = min(this->vscroll[side]->GetCapacity() + start, (uint)this->engines[side].size());
/* Do the actual drawing */
DrawEngineList((VehicleType)this->window_number, r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP,