mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 14:41:55 +00:00
SW: Fix -Waggressive-loop-optimizations
git-svn-id: https://svn.eduke32.com/eduke32@7562 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
7ea2d2024b
commit
fdb5fabc86
2 changed files with 5 additions and 8 deletions
|
@ -250,7 +250,7 @@ void CONFIG_SetDefaults(void)
|
|||
}
|
||||
|
||||
memset(JoystickDigitalAxes, -1, sizeof(JoystickDigitalAxes));
|
||||
for (i=0; i < (int32_t)(sizeof(joystickanalogdefaults)/sizeof(char *)); i++)
|
||||
for (i=0; i < MAXJOYAXES; i++)
|
||||
{
|
||||
JoystickAnalogScale[i] = 65536;
|
||||
JoystickAnalogDead[i] = 1024;
|
||||
|
|
|
@ -816,12 +816,9 @@ int TileRangeMem(int start)
|
|||
|
||||
void CON_Cache(void)
|
||||
{
|
||||
char incache[8192]; // 8192 so it can index maxwalls as well
|
||||
char incache[MAXTILES]{};
|
||||
int i,j,tottiles,totsprites,totactors;
|
||||
|
||||
|
||||
memset(incache,0,8192);
|
||||
|
||||
// Calculate all level tiles, non-actor stuff
|
||||
for (i=0; i<numsectors; i++)
|
||||
{
|
||||
|
@ -837,13 +834,13 @@ void CON_Cache(void)
|
|||
}
|
||||
|
||||
tottiles = 0;
|
||||
for (i=0; i<8192; i++)
|
||||
for (i=0; i<MAXTILES; i++)
|
||||
if (incache[i] > 0)
|
||||
tottiles += tilesiz[i].x*tilesiz[i].y;
|
||||
|
||||
//////////////////////////////////////////////
|
||||
|
||||
memset(incache,0,8192);
|
||||
memset(incache, 0, sizeof(incache));
|
||||
|
||||
// Sprites on the stat list get counted as cached, others don't
|
||||
for (i=0; i<MAXSPRITES; i++)
|
||||
|
@ -853,7 +850,7 @@ void CON_Cache(void)
|
|||
totsprites = 0;
|
||||
totactors = 0;
|
||||
|
||||
for (i=0; i<MAXSPRITES; i++)
|
||||
for (i=0; i<MAXTILES; i++)
|
||||
{
|
||||
if (incache[i] > 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue