mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-13 03:20:44 +00:00
Fix warning: left shift of negative value [-Wshift-negative-value]
DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@5841 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
1fc836fa21
commit
a0183c9c42
1 changed files with 8 additions and 6 deletions
|
@ -114,19 +114,21 @@ static void putvox(int32_t x, int32_t y, int32_t z, int32_t col)
|
||||||
#if 0
|
#if 0
|
||||||
static void setzrange0(int32_t *lptr, int32_t z0, int32_t z1)
|
static void setzrange0(int32_t *lptr, int32_t z0, int32_t z1)
|
||||||
{
|
{
|
||||||
if (!((z0^z1)&~31)) { lptr[z0>>5] &= ((~(-1<<SHIFTMOD32(z0)))|(-1<<SHIFTMOD32(z1))); return; }
|
if (!((z0^z1)&~31)) { lptr[z0>>5] &= ((~-(1<<SHIFTMOD32(z0)))|-(1<<SHIFTMOD32(z1))); return; }
|
||||||
int32_t z = (z0>>5), ze = (z1>>5);
|
int32_t z = (z0>>5), ze = (z1>>5);
|
||||||
lptr[z] &=~(-1<<SHIFTMOD32(z0)); for (z++; z<ze; z++) lptr[z] = 0;
|
lptr[z] &=~-(1<<SHIFTMOD32(z0));
|
||||||
lptr[z] &= (-1<<SHIFTMOD32(z1));
|
for (z++; z<ze; z++) lptr[z] = 0;
|
||||||
|
lptr[z] &= -(1<<SHIFTMOD32(z1));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
//Set all bits in vbit from (x,y,z0) to (x,y,z1-1) to 1's
|
//Set all bits in vbit from (x,y,z0) to (x,y,z1-1) to 1's
|
||||||
static void setzrange1(int32_t *lptr, int32_t z0, int32_t z1)
|
static void setzrange1(int32_t *lptr, int32_t z0, int32_t z1)
|
||||||
{
|
{
|
||||||
if (!((z0^z1)&~31)) { lptr[z0>>5] |= ((~(-1<<SHIFTMOD32(z1)))&(-1<<SHIFTMOD32(z0))); return; }
|
if (!((z0^z1)&~31)) { lptr[z0>>5] |= ((~-(1<<SHIFTMOD32(z1)))&-(1<<SHIFTMOD32(z0))); return; }
|
||||||
int32_t z = (z0>>5), ze = (z1>>5);
|
int32_t z = (z0>>5), ze = (z1>>5);
|
||||||
lptr[z] |= (-1<<SHIFTMOD32(z0)); for (z++; z<ze; z++) lptr[z] = -1;
|
lptr[z] |= -(1<<SHIFTMOD32(z0));
|
||||||
lptr[z] |=~(-1<<SHIFTMOD32(z1));
|
for (z++; z<ze; z++) lptr[z] = -1;
|
||||||
|
lptr[z] |=~-(1<<SHIFTMOD32(z1));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t isrectfree(int32_t x0, int32_t y0, int32_t dx, int32_t dy)
|
static int32_t isrectfree(int32_t x0, int32_t y0, int32_t dx, int32_t dy)
|
||||||
|
|
Loading…
Reference in a new issue