From d87801acaa94e7088bf9fdeedc15f29a8c27c226 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 2 Sep 2008 19:12:06 -0400 Subject: [PATCH] Remove pointless getFOO() from prewrite callbacks Empire3's C_SYNC code added these to sct_prewrite(), shp_prewrite(), pln_prewrite(), lnd_prewrite() and nuk_prewrite(). They weren't removed when C_SYNC was ripped out in 4.0.0. --- src/lib/subs/land.c | 4 ---- src/lib/subs/nuke.c | 3 --- src/lib/subs/plane.c | 2 -- src/lib/subs/sect.c | 2 -- src/lib/subs/ship.c | 4 ---- 5 files changed, 15 deletions(-) diff --git a/src/lib/subs/land.c b/src/lib/subs/land.c index 3d37b8e5c..2a8379d5a 100644 --- a/src/lib/subs/land.c +++ b/src/lib/subs/land.c @@ -112,7 +112,6 @@ void lnd_prewrite(int n, void *ptr) { struct lndstr *llp = ptr; - struct lndstr land; struct lndstr *lp; struct plnstr *pp; int i; @@ -122,8 +121,6 @@ lnd_prewrite(int n, void *ptr) llp->lnd_x, llp->lnd_y); llp->lnd_own = 0; - getland(n, &land); - for (i = 0; NULL != (lp = getlandp(i)); i++) { if (lp->lnd_own && lp->lnd_land == n) { mpr(lp->lnd_own, "%s MIA!\n", prland(lp)); @@ -150,7 +147,6 @@ lnd_prewrite(int n, void *ptr) } } else { item_prewrite(llp->lnd_item); - getland(n, &land); } } diff --git a/src/lib/subs/nuke.c b/src/lib/subs/nuke.c index 8a49e7280..ae4451508 100644 --- a/src/lib/subs/nuke.c +++ b/src/lib/subs/nuke.c @@ -77,7 +77,6 @@ void nuk_prewrite(int n, void *ptr) { struct nukstr *np = ptr; - struct nukstr nuke; if (np->nuk_effic == 0) { if (np->nuk_own) @@ -86,8 +85,6 @@ nuk_prewrite(int n, void *ptr) np->nuk_own = 0; np->nuk_effic = 0; } - - getnuke(n, &nuke); } int diff --git a/src/lib/subs/plane.c b/src/lib/subs/plane.c index e51ef1a52..d5a6b1e86 100644 --- a/src/lib/subs/plane.c +++ b/src/lib/subs/plane.c @@ -111,7 +111,6 @@ void pln_prewrite(int n, void *ptr) { struct plnstr *pp = ptr; - struct plnstr plane; struct nukstr *np; int i; @@ -130,7 +129,6 @@ pln_prewrite(int n, void *ptr) } } } - getplane(n, &plane); } char * diff --git a/src/lib/subs/sect.c b/src/lib/subs/sect.c index 053214fe5..f94dd0d4e 100644 --- a/src/lib/subs/sect.c +++ b/src/lib/subs/sect.c @@ -65,11 +65,9 @@ void sct_prewrite(int id, void *ptr) { struct sctstr *sp = ptr; - struct sctstr sect; bridge_damaged(sp); checksect(sp); - getsect(sp->sct_x, sp->sct_y, §); } void diff --git a/src/lib/subs/ship.c b/src/lib/subs/ship.c index 8501205ab..6c6af313d 100644 --- a/src/lib/subs/ship.c +++ b/src/lib/subs/ship.c @@ -65,7 +65,6 @@ void shp_prewrite(int n, void *ptr) { struct shpstr *sp = ptr; - struct shpstr ship; struct lndstr *lp; struct plnstr *pp; int i; @@ -75,8 +74,6 @@ shp_prewrite(int n, void *ptr) makelost(EF_SHIP, sp->shp_own, sp->shp_uid, sp->shp_x, sp->shp_y); sp->shp_own = 0; - getship(n, &ship); - for (i = 0; NULL != (lp = getlandp(i)); i++) { if (lp->lnd_own && lp->lnd_ship == n) { mpr(lp->lnd_own, "%s sunk!\n", prland(lp)); @@ -97,7 +94,6 @@ shp_prewrite(int n, void *ptr) } } else { item_prewrite(sp->shp_item); - getship(n, &ship); } } -- 2.43.0