subs: Drop contains_engineer(), lnd_find_capable() can do
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
92f36aa4f5
commit
482f1e91c5
1 changed files with 1 additions and 17 deletions
|
@ -675,22 +675,6 @@ lnd_sweep(struct emp_qelem *land_list, int explicit, int takemob,
|
|||
return stopping;
|
||||
}
|
||||
|
||||
static int
|
||||
contains_engineer(struct emp_qelem *list)
|
||||
{
|
||||
struct emp_qelem *qp;
|
||||
struct emp_qelem *next;
|
||||
struct ulist *llp;
|
||||
|
||||
for (qp = list->q_back; qp != list; qp = next) {
|
||||
next = qp->q_back;
|
||||
llp = (struct ulist *)qp;
|
||||
if (lchr[llp->unit.land.lnd_type].l_flags & L_ENGINEER)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
lnd_check_one_mines(struct ulist *llp, int with_eng)
|
||||
{
|
||||
|
@ -719,7 +703,7 @@ lnd_check_mines(struct emp_qelem *land_list)
|
|||
struct emp_qelem *next;
|
||||
struct ulist *llp;
|
||||
int stopping = 0;
|
||||
int with_eng = contains_engineer(land_list);
|
||||
int with_eng = !!lnd_find_capable(land_list, L_ENGINEER);
|
||||
|
||||
for (qp = land_list->q_back; qp != land_list; qp = next) {
|
||||
next = qp->q_back;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue