From 17d3c302a3809abe8bd729cea368d9acf58f7144 Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 24 Jul 2019 01:37:57 +0000 Subject: [PATCH] Switch a few iterators in clipmove() from int to native_t git-svn-id: https://svn.eduke32.com/eduke32@7828 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/clip.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/build/src/clip.cpp b/source/build/src/clip.cpp index 5b98ec9f3..35bfaa842 100644 --- a/source/build/src/clip.cpp +++ b/source/build/src/clip.cpp @@ -1197,7 +1197,7 @@ int32_t clipmove(vec3_t * const pos, int16_t * const sectnum, int32_t xvect, int if (curspr) continue; // next sector of this index #endif - for (int j=headspritesect[dasect]; j>=0; j=nextspritesect[j]) + for (native_t j=headspritesect[dasect]; j>=0; j=nextspritesect[j]) { auto const spr = (uspriteptr_t)&sprite[j]; const int32_t cstat = spr->cstat; @@ -1321,7 +1321,7 @@ int32_t clipmove(vec3_t * const pos, int16_t * const sectnum, int32_t xvect, int } #endif - int32_t hitwalls[4] = {}, hitwall; + int32_t hitwalls[4], hitwall; int32_t clipReturn = 0; native_t cnt = clipmoveboxtracenum; @@ -1347,7 +1347,7 @@ int32_t clipmove(vec3_t * const pos, int16_t * const sectnum, int32_t xvect, int int32_t const tempint1 = dmulscale6(clipr.x, move.x, clipr.y, move.y); - for (int i=cnt+1, j; i<=clipmoveboxtracenum; ++i) + for (native_t i=cnt+1, j; i<=clipmoveboxtracenum; ++i) { j = hitwalls[i]; int32_t const tempint2 = dmulscale6(clipit[j].x2 - clipit[j].x1, move.x, clipit[j].y2 - clipit[j].y1, move.y);