commit 86de35dda7b48126f4a8e246ab0c458dee628ed2
Author: mfrancis95 <mikefrancis95@gmail.com>
AuthorDate: Thu Oct 8 17:04:16 2020 -0400
Commit: mfrancis95 <mikefrancis95@gmail.com>
CommitDate: Thu Oct 8 17:04:16 2020 -0400
Remove unused variable "state" in P_MovePsprites
This fixes a warning generated by cppcheck.
---
src/doom/p_pspr.c | 3 +--
src/heretic/p_pspr.c | 3 +--
src/hexen/p_pspr.c | 3 +--
src/strife/p_pspr.c | 3 +--
4 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/doom/p_pspr.c b/src/doom/p_pspr.c
index 097cace2..c8c1776c 100644
--- a/src/doom/p_pspr.c
+++ b/src/doom/p_pspr.c
@@ -861,13 +861,12 @@ void P_MovePsprites (player_t* player)
{
int i;
pspdef_t* psp;
- state_t* state;
psp = &player->psprites[0];
for (i=0 ; i<NUMPSPRITES ; i++, psp++)
{
// a null state means not active
- if ( (state = psp->state) )
+ if (psp->state)
{
// drop tic count and possibly change state
diff --git a/src/heretic/p_pspr.c b/src/heretic/p_pspr.c
index 7daeebc8..d0fc3c62 100644
--- a/src/heretic/p_pspr.c
+++ b/src/heretic/p_pspr.c
@@ -1885,12 +1885,11 @@ void P_MovePsprites(player_t * player)
{
int i;
pspdef_t *psp;
- state_t *state;
psp = &player->psprites[0];
for (i = 0; i < NUMPSPRITES; i++, psp++)
{
- if ((state = psp->state) != 0) // a null state means not active
+ if (psp->state != 0) // a null state means not active
{
// drop tic count and possibly change state
if (psp->tics != -1) // a -1 tic count never changes
diff --git a/src/hexen/p_pspr.c b/src/hexen/p_pspr.c
index 9ab2a752..54c012e9 100644
--- a/src/hexen/p_pspr.c
+++ b/src/hexen/p_pspr.c
@@ -2457,12 +2457,11 @@ void P_MovePsprites(player_t * player)
{
int i;
pspdef_t *psp;
- state_t *state;
psp = &player->psprites[0];
for (i = 0; i < NUMPSPRITES; i++, psp++)
{
- if ((state = psp->state) != 0) // a null state means not active
+ if (psp->state != 0) // a null state means not active
{
// drop tic count and possibly change state
if (psp->tics != -1) // a -1 tic count never changes
diff --git a/src/strife/p_pspr.c b/src/strife/p_pspr.c
index 4295c977..f7f28393 100644
--- a/src/strife/p_pspr.c
+++ b/src/strife/p_pspr.c
@@ -970,13 +970,12 @@ void P_MovePsprites (player_t* player)
{
int i;
pspdef_t* psp;
- state_t* state;
psp = &player->psprites[0];
for(i = 0; i < NUMPSPRITES; i++, psp++)
{
// a null state means not active
- if((state = psp->state))
+ if(psp->state)
{
// drop tic count and possibly change state