bsputil: don't test < 0 on unsigned vertex and marksurf numbers
Now that our type constraints dictate they can never appear < 0. Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
125ee1f85f
commit
509289efd3
|
|
@ -189,9 +189,6 @@ CheckBSPFile(const bsp2_t *bsp)
|
||||||
|
|
||||||
for (j = 0; j < 2; j++) {
|
for (j = 0; j < 2; j++) {
|
||||||
const uint32_t vertex = edge->v[j];
|
const uint32_t vertex = edge->v[j];
|
||||||
if (vertex < 0)
|
|
||||||
printf("warning: edge %d has vertex %d < 0 (%d)\n",
|
|
||||||
i, j, vertex);
|
|
||||||
if (vertex > bsp->numvertexes)
|
if (vertex > bsp->numvertexes)
|
||||||
printf("warning: edge %d has vertex %d out range "
|
printf("warning: edge %d has vertex %d out range "
|
||||||
"(%d >= %d)\n", i, j, vertex, bsp->numvertexes);
|
"(%d >= %d)\n", i, j, vertex, bsp->numvertexes);
|
||||||
|
|
@ -221,9 +218,6 @@ CheckBSPFile(const bsp2_t *bsp)
|
||||||
const bsp2_dleaf_t *leaf = &bsp->dleafs[i];
|
const bsp2_dleaf_t *leaf = &bsp->dleafs[i];
|
||||||
const uint32_t endmarksurface =
|
const uint32_t endmarksurface =
|
||||||
leaf->firstmarksurface + leaf->nummarksurfaces;
|
leaf->firstmarksurface + leaf->nummarksurfaces;
|
||||||
if (leaf->firstmarksurface < 0)
|
|
||||||
printf("warning: leaf %d had negative firstmarksurface (%d)\n",
|
|
||||||
i, leaf->firstmarksurface);
|
|
||||||
if (endmarksurface > bsp->nummarksurfaces)
|
if (endmarksurface > bsp->nummarksurfaces)
|
||||||
printf("warning: leaf %d has marksurfaces out of range "
|
printf("warning: leaf %d has marksurfaces out of range "
|
||||||
"(%d..%d >= %d)\n", i, leaf->firstmarksurface,
|
"(%d..%d >= %d)\n", i, leaf->firstmarksurface,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue