This can't happen currently, because produce() never gets called with
work>999.
(produce): Fix rounding of consumed materials on production backlog.
Broken by the previous revision.
arrays instead of copies made by getvec(). This is safe, because the
old code made single copies and always flushed them back into the unit
structures. Else make copies by hand, not with getvec.
(starv_sects): Replace getvec() by direct, read-only item access.
(upd_buildeff, enlist, materials_charge, materials_cost, produce,
grow_people, growfood, trunc_people, do_feed, feed_people): Change
argument type to match uncopied item arrays.
(growfood): Obey ITEM_MAX.
copies made by getvec(). This is safe, because the old code made
single copies and always flushed them back into the unit structures.
(meltitems): Don't claim more items were lost than existed.
of copies made by getvec(). This is safe, because the new code
changes the item array precisely when the old code writes back a
changed copy.
(starv_ships, starv_units): Replace getvec() by direct, read-only item
access.
(feed_ship, feed_land): Remove parameter vec, work with sp->shp_item[]
and lp->lnd_item[] instead.
(plague_people): Change argument type to match uncopied item arrays.
sp->sct_item, sp->sct_effic, sp->sct_mobil instead. This is safe,
because the only caller passed a copy of sp->sct_item created with
getvec(), and infect_people() doesn't change it. Caller changed.
(infect_people): Rewrite plague risk computation for clarity.
one due to rounding, fix. However, the fixed code is currently
unreachable, as caller runs resupply_commod() before feed_land().
(feed_ship): Simplify. No functional changes.
This is safe, because the only caller passed a copy of the latter
created with getvec(), and dodeliver() doesn't change it. Caller
changed. Return value no longer needed, remove.
This is safe, because the only caller passed a copy of the latter
created with getvec(), and populace() doesn't change it.
(tax): Replace getvec() by direct, read-only item access.
of copies made by getvec(). This is safe, because the old code made
single copies and always flushed them back into the unit structures
before flushing those. Simplify.
access. This is correct, because the old code doesn't use the copy
after it changes the original in the unit structure.
(dd): Remove call of getvec() that has no effect.
getvec(). This is safe, because the old code made single copies and
always flushed them back into the unit structures before flushing
those, in use_ammo(), or discarded both the copy and the unit
structure.
getvec(). This is safe, because the old code made single copies and
always flushed them back into the unit structures before flushing
those. To do: obey ITEM_MAX.
constituents in sector. Work directly on item arrays instead of
copies made by getvec(). This is safe, because the old code made
single copies and always flushed them back into the unit structures
before flushing those.
of copies made by getvec(). This is safe, because the old code made
single copies and always flushed them back into the unit structures
before flushing those.
getvec(). This is safe, because the old code made single copies and
always flushed them back into the unit structures before flushing
those.
(build_ship, build_land, build_bridge, build_nuke, build_plane,
build_tower): Change parameter type to match uncopied item arrays.