update: Move work percentage update into do_feed()
Since changing *sp is safe now, we can move the update of sp->sct_work into do_feed(), use the return value for work, and drop parameter workp. The sp->sct_avail update looks similar, but there's a subtle difference: it's skipped when the sector is stopped or its owner is broke. The caller already checks that, so leave the update there. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
4daf98a160
commit
d30de533d7
3 changed files with 8 additions and 11 deletions
|
@ -664,7 +664,7 @@ extern int dodistribute(struct sctstr *, int, double);
|
|||
extern void finish_sects(int);
|
||||
/* human.c */
|
||||
extern int new_work(struct sctstr *, int);
|
||||
extern int do_feed(struct sctstr *, struct natstr *, int *, int);
|
||||
extern int do_feed(struct sctstr *, struct natstr *, int);
|
||||
extern int feed_people(short *, int);
|
||||
extern double food_needed(short *, int);
|
||||
extern int famine_victims(short *, int);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue