summaryrefslogtreecommitdiff
path: root/src/group_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/group_gui.cpp
parente817951bfdc229b404d5fec188c67f5202a0e774 (diff)
downloadopenttd-66dd7c3879123bb99b712375b66b577f81d53a96.tar.xz
Fix: MSVC warnings (#7423)
Diffstat (limited to 'src/group_gui.cpp')
-rw-r--r--src/group_gui.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/group_gui.cpp b/src/group_gui.cpp
index cc545ad8f..ecc95064f 100644
--- a/src/group_gui.cpp
+++ b/src/group_gui.cpp
@@ -514,8 +514,8 @@ public:
this->BuildGroupList(this->owner);
- this->group_sb->SetCount(this->groups.size());
- this->vscroll->SetCount(this->vehicles.size());
+ this->group_sb->SetCount((uint)this->groups.size());
+ this->vscroll->SetCount((uint)this->vehicles.size());
/* The drop down menu is out, *but* it may not be used, retract it. */
if (this->vehicles.size() == 0 && this->IsWidgetLowered(WID_GL_MANAGE_VEHICLES_DROPDOWN)) {
@@ -575,7 +575,7 @@ public:
Money this_year = 0;
Money last_year = 0;
uint32 occupancy = 0;
- uint32 vehicle_count = this->vehicles.size();
+ size_t vehicle_count = this->vehicles.size();
for (uint i = 0; i < vehicle_count; i++) {
const Vehicle *v = this->vehicles[i];
@@ -611,7 +611,7 @@ public:
case WID_GL_LIST_GROUP: {
int y1 = r.top + WD_FRAMERECT_TOP;
- int max = min(this->group_sb->GetPosition() + this->group_sb->GetCapacity(), this->groups.size());
+ int max = min(this->group_sb->GetPosition() + this->group_sb->GetCapacity(), (uint)this->groups.size());
for (int i = this->group_sb->GetPosition(); i < max; ++i) {
const Group *g = this->groups[i];
@@ -635,7 +635,7 @@ public:
if (this->vli.index != ALL_GROUP) {
/* Mark vehicles which are in sub-groups */
int y = r.top;
- uint max = min(this->vscroll->GetPosition() + this->vscroll->GetCapacity(), this->vehicles.size());
+ uint max = min(this->vscroll->GetPosition() + this->vscroll->GetCapacity(), (uint)this->vehicles.size());
for (uint i = this->vscroll->GetPosition(); i < max; ++i) {
const Vehicle *v = this->vehicles[i];
if (v->group_id != this->vli.index) {