ref: 01168584c8f0e6485efcd8ffa5e9f720809eb64c
parent: 7a0db31614ec187e363e7664036d95ec56242e44
parent: 86de35dda7b48126f4a8e246ab0c458dee628ed2
author: Simon Howard <fraggle@soulsphere.org>
date: Thu Oct 8 15:19:10 EDT 2020
Merge pull request #1322 from mfrancis95/cppcheckwarningfix1 Remove unused variable "state" in P_MovePsprites
--- a/src/doom/p_pspr.c
+++ b/src/doom/p_pspr.c
@@ -861,13 +861,12 @@
{
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
--- a/src/heretic/p_pspr.c
+++ b/src/heretic/p_pspr.c
@@ -1885,12 +1885,11 @@
{
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
--- a/src/hexen/p_pspr.c
+++ b/src/hexen/p_pspr.c
@@ -2457,12 +2457,11 @@
{
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
--- a/src/strife/p_pspr.c
+++ b/src/strife/p_pspr.c
@@ -970,13 +970,12 @@
{
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