Clean up casts from union empobj_storage * to struct empobj *
Take the address of member gen instead. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
52a40481cb
commit
c274d0820c
2 changed files with 3 additions and 3 deletions
|
@ -165,7 +165,7 @@ mission(void)
|
||||||
radius = 9999;
|
radius = 9999;
|
||||||
|
|
||||||
while (nxtitem(&ni, &item)) {
|
while (nxtitem(&ni, &item)) {
|
||||||
gp = (struct empobj *)&item;
|
gp = &item.gen;
|
||||||
|
|
||||||
if (!player->owner || gp->own == 0)
|
if (!player->owner || gp->own == 0)
|
||||||
continue;
|
continue;
|
||||||
|
@ -300,7 +300,7 @@ show_mission(struct nstr_item *np)
|
||||||
struct empobj *gp;
|
struct empobj *gp;
|
||||||
|
|
||||||
while (nxtitem(np, &item)) {
|
while (nxtitem(np, &item)) {
|
||||||
gp = (struct empobj *)&item;
|
gp = &item.gen;
|
||||||
if (!player->owner || gp->own == 0)
|
if (!player->owner || gp->own == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
|
@ -289,7 +289,7 @@ build_mission_list_type(struct genlist mi[], unsigned char act[],
|
||||||
|
|
||||||
snxtitem_all(&ni, type);
|
snxtitem_all(&ni, type);
|
||||||
while (nxtitem(&ni, &item)) {
|
while (nxtitem(&ni, &item)) {
|
||||||
gp = (struct empobj *)&item;
|
gp = &item.gen;
|
||||||
|
|
||||||
if (!act[gp->own])
|
if (!act[gp->own])
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue