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

pull/155/head
rubidium 17 years ago
parent b5a9cc0ed8
commit 37e3cbb980

@ -1586,7 +1586,7 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)
if (_patches.gradual_loading) cap = min(cap, load_amount);
if (_patches.improved_load) {
/* 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;
}

@ -97,7 +97,7 @@ int GetRoadVehImage(const Vehicle* v, Direction direction)
}
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;
}

@ -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]);
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;
}

Loading…
Cancel
Save