(svn r10287) -Fix (r10266): some surprises from that (almost always) complaining compiler...

This commit is contained in:
rubidium 2007-06-22 22:28:15 +00:00
parent b5a9cc0ed8
commit 37e3cbb980
3 changed files with 3 additions and 3 deletions

View File

@ -1586,7 +1586,7 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)
if (_patches.gradual_loading) cap = min(cap, load_amount); if (_patches.gradual_loading) cap = min(cap, load_amount);
if (_patches.improved_load) { if (_patches.improved_load) {
/* Don't load stuff that is already 'reserved' for other vehicles */ /* Don't load stuff that is already 'reserved' for other vehicles */
cap = min(cargo_left[v->cargo_type], cap); cap = min((uint)cargo_left[v->cargo_type], cap);
cargo_left[v->cargo_type] -= cap; cargo_left[v->cargo_type] -= cap;
} }

View File

@ -97,7 +97,7 @@ int GetRoadVehImage(const Vehicle* v, Direction direction)
} }
image = direction + _roadveh_images[img]; image = direction + _roadveh_images[img];
if (v->cargo.Count() >= v->cargo_cap / 2) image += _roadveh_full_adder[img]; if (v->cargo.Count() >= v->cargo_cap / 2U) image += _roadveh_full_adder[img];
return image; return image;
} }

View File

@ -463,7 +463,7 @@ int GetTrainImage(const Vehicle* v, Direction direction)
base = _engine_sprite_base[img] + ((direction + _engine_sprite_add[img]) & _engine_sprite_and[img]); base = _engine_sprite_base[img] + ((direction + _engine_sprite_add[img]) & _engine_sprite_and[img]);
if (v->cargo.Count() >= v->cargo_cap / 2) base += _wagon_full_adder[img]; if (v->cargo.Count() >= v->cargo_cap / 2U) base += _wagon_full_adder[img];
return base; return base;
} }