Clean up casts from struct FOO * to struct emp_qelem *
Take the address of the queue member instead. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
4d899f6e6d
commit
52a40481cb
4 changed files with 10 additions and 10 deletions
|
@ -1428,7 +1428,7 @@ put_oland(struct emp_qelem *list)
|
|||
llp->mobil = 0.0;
|
||||
putland(llp->unit.land.lnd_uid, &llp->unit.land);
|
||||
if (llp->unit.land.lnd_own != player->cnum) {
|
||||
emp_remque((struct emp_qelem *)llp);
|
||||
emp_remque(&llp->queue);
|
||||
free(llp);
|
||||
} else
|
||||
get_oland(A_ATTACK, llp);
|
||||
|
|
|
@ -149,7 +149,7 @@ void
|
|||
lnd_delete(struct ulist *llp)
|
||||
{
|
||||
putland(llp->unit.land.lnd_uid, &llp->unit.land);
|
||||
emp_remque((struct emp_qelem *)llp);
|
||||
emp_remque(&llp->queue);
|
||||
free(llp);
|
||||
}
|
||||
|
||||
|
@ -476,7 +476,7 @@ lnd_mar(struct emp_qelem *list, double *minmobp, double *maxmobp,
|
|||
if (lp->lnd_own != actor) {
|
||||
mpr(actor, "%s was disbanded at %s\n",
|
||||
prland(lp), xyas(lp->lnd_x, lp->lnd_y, actor));
|
||||
emp_remque((struct emp_qelem *)llp);
|
||||
emp_remque(&llp->queue);
|
||||
free(llp);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ ground_interdict(coord x, coord y, natid victim, char *s)
|
|||
act[0] = 0;
|
||||
for (cn = 1; cn < MAXNOC; cn++) {
|
||||
act[cn] = relations_with(cn, victim) <= HOSTILE;
|
||||
emp_initque((struct emp_qelem *)&mi[cn]);
|
||||
emp_initque(&mi[cn].queue);
|
||||
}
|
||||
|
||||
build_mission_list(mi, act, act, x, y, MI_INTERDICT);
|
||||
|
@ -192,7 +192,7 @@ unit_interdict(coord x, coord y, natid victim, char *s, int hardtarget,
|
|||
other_act[cn] = rel <= HOSTILE;
|
||||
plane_act[cn] = mission == MI_SINTERDICT
|
||||
? rel <= NEUTRAL : other_act[cn];
|
||||
emp_initque((struct emp_qelem *)&mi[cn]);
|
||||
emp_initque(&mi[cn].queue);
|
||||
}
|
||||
|
||||
build_mission_list(mi, other_act, plane_act, x, y, mission);
|
||||
|
@ -250,7 +250,7 @@ dosupport(coord x, coord y, natid victim, natid actee, int mission)
|
|||
act[0] = 0;
|
||||
for (cn = 1; cn < MAXNOC; cn++) {
|
||||
act[cn] = feels_like_helping(cn, actee, victim);
|
||||
emp_initque((struct emp_qelem *)&mi[cn]);
|
||||
emp_initque(&mi[cn].queue);
|
||||
}
|
||||
|
||||
build_mission_list(mi, act, act, x, y, MI_SUPPORT);
|
||||
|
@ -992,7 +992,7 @@ add_airport(struct emp_qelem *airp, coord x, coord y)
|
|||
getsect(x, y, §);
|
||||
a->own = sect.sct_own;
|
||||
|
||||
emp_insque((struct emp_qelem *)a, airp);
|
||||
emp_insque(&a->queue, airp);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -118,7 +118,7 @@ shp_nav(struct emp_qelem *list, double *minmobp, double *maxmobp,
|
|||
if (sp->shp_own != actor) {
|
||||
mpr(actor, "%s was sunk at %s\n",
|
||||
prship(sp), xyas(sp->shp_x, sp->shp_y, actor));
|
||||
emp_remque((struct emp_qelem *)mlp);
|
||||
emp_remque(&mlp->queue);
|
||||
free(mlp);
|
||||
continue;
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ shp_stays(natid actor, char *str, struct ulist *mlp)
|
|||
xyas(mlp->unit.ship.shp_x, mlp->unit.ship.shp_y, actor));
|
||||
mlp->unit.ship.shp_mobil = (int)mlp->mobil;
|
||||
putship(mlp->unit.ship.shp_uid, &mlp->unit.ship);
|
||||
emp_remque((struct emp_qelem *)mlp);
|
||||
emp_remque(&mlp->queue);
|
||||
free(mlp);
|
||||
}
|
||||
|
||||
|
@ -377,7 +377,7 @@ shp_damage_one(struct ulist *mlp, int dam)
|
|||
shipdamage(&mlp->unit.ship, dam);
|
||||
putship(mlp->unit.ship.shp_uid, &mlp->unit.ship);
|
||||
if (!mlp->unit.ship.shp_own) {
|
||||
emp_remque((struct emp_qelem *)mlp);
|
||||
emp_remque(&mlp->queue);
|
||||
free(mlp);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue