Fix a bunch of dead increments.

This commit is contained in:
Bill Currie 2018-09-09 11:12:04 +09:00
parent 3f638d95ba
commit db3df6f8a7
3 changed files with 1 additions and 16 deletions

View file

@ -228,6 +228,7 @@ read_list (riff_d_chunk_t *ck, QFile *f, int len)
riff_data_t *data = malloc (sizeof (riff_data_t));
if (!Rread (f, &data->ck, sizeof (data->ck))) {
free (data);
len = 0;
} else {
data->ck.len = LittleLong (data->ck.len);
data->data = read_data (f, data->ck.len);
@ -235,7 +236,6 @@ read_list (riff_d_chunk_t *ck, QFile *f, int len)
chunk = &data->ck;
}
}
len = 0;
break;
}
if (chunk) {

View file

@ -445,7 +445,6 @@ qfgl_InterleavedArrays (GLenum format, GLsizei stride, const GLvoid *pointer)
case GL_C4UB_V2F:
qfgl_VertexPointer (2, GL_FLOAT, stride - 2 * sizeof (GLfloat),
ptr);
ptr += 2 * sizeof (GLfloat);
break;
case GL_V3F:
case GL_C4UB_V3F:
@ -459,13 +458,11 @@ qfgl_InterleavedArrays (GLenum format, GLsizei stride, const GLvoid *pointer)
case GL_T2F_C4F_N3F_V3F:
qfgl_VertexPointer (3, GL_FLOAT, stride - 3 * sizeof (GLfloat),
ptr);
ptr += 3 * sizeof (GLfloat);
break;
case GL_T4F_V4F:
case GL_T4F_C4F_N3F_V4F:
qfgl_VertexPointer (4, GL_FLOAT, stride - 4 * sizeof (GLfloat),
ptr);
ptr += 4 * sizeof (GLfloat);
break;
default:
break;

View file

@ -515,14 +515,10 @@ sw32_D_DrawSpans (espan_t *pspan)
}
if (count & 1)
pdest[0] = pbase[(t >> 16) * sw32_cachewidth + (s >> 16)];
s += sstep;
t += tstep;
}
else
{
pdest[0] = pbase[(t >> 16) * sw32_cachewidth + (s >> 16)];
s += sstep;
t += tstep;
}
}
} while ((pspan = pspan->pnext) != NULL);
@ -657,14 +653,10 @@ sw32_D_DrawSpans (espan_t *pspan)
}
if (count & 1)
pdest[0] = pbase[(t >> 16) * sw32_cachewidth + (s >> 16)];
s += sstep;
t += tstep;
}
else
{
pdest[0] = pbase[(t >> 16) * sw32_cachewidth + (s >> 16)];
s += sstep;
t += tstep;
}
}
} while ((pspan = pspan->pnext) != NULL);
@ -800,14 +792,10 @@ sw32_D_DrawSpans (espan_t *pspan)
}
if (count & 1)
pdest[0] = pbase[(t >> 16) * sw32_cachewidth + (s >> 16)];
s += sstep;
t += tstep;
}
else
{
pdest[0] = pbase[(t >> 16) * sw32_cachewidth + (s >> 16)];
s += sstep;
t += tstep;
}
}
} while ((pspan = pspan->pnext) != NULL);