]> git.pond.sub.org Git - empserver/commit - src/lib/update/bp.c
update: Drop redundant bp map updates and functions
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 5 Jun 2016 16:18:12 +0000 (18:18 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 17:59:58 +0000 (19:59 +0200)
commit5b0fd1171d1dbd1e2c4a31ddf2e99ee199829ab8
treedaf95a044a7b6231b3dfe666224de40332c064fc
parent199b1498c8ba2ac2d32f2091a5d37685ec136d5d
update: Drop redundant bp map updates and functions

produce_sect() updates the bp map several times.  This is wasteful:
since only ship, plane and land unit building reads it, bp map writes
before the last one are never read.  Update it just once for every
sector.

The update for sectors that are stopped or whose owner is broke is the
only remaining use of bp_put_items().  Since available work must still
be unchanged there, we can replace it by bp_set_from_sect().

bp_get_item(), bp_put_item(), bp_get_items(), bp_get_avail() and
bp_put_avail() are now unused.  Drop them.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
include/budg.h
src/lib/update/bp.c
src/lib/update/sect.c