Fix: MSVC warnings (#7423)

This commit is contained in:
glx22
2019-03-28 00:09:33 +01:00
committed by GitHub
parent e817951bfd
commit 66dd7c3879
39 changed files with 88 additions and 88 deletions

View File

@@ -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) {