Remove superflous casts and parenthesis.

This commit is contained in:
Markus Armbruster 2006-05-21 12:24:30 +00:00
parent f883710417
commit cd73a47dfa
28 changed files with 136 additions and 145 deletions

View file

@ -212,10 +212,10 @@ auto_fuel_ship(struct shpstr *sp)
if (opt_FUEL == 0)
return;
getship(sp->shp_uid, sp); /* refresh */
/* fill with petro */
/* fill with petrol */
maxfuel = mchr[(int)sp->shp_type].m_fuelc;
d = (double)maxfuel / 5.0;
if ((d - (int)d > 0.0))
d = maxfuel / 5.0;
if (d - (int)d > 0.0)
d++;
need = (int)d;
@ -233,8 +233,8 @@ auto_fuel_ship(struct shpstr *sp)
}
add_fuel = 0;
/* fill with oil */
d = (double)(maxfuel - totalfuel) / 50.0;
if ((d - (int)d > 0.0))
d = (maxfuel - totalfuel) / 50.0;
if (d - (int)d > 0.0)
d++;
need = (int)d;