don't let gcc automaticly inline functions but make gcc inline bigger

functions when told to. also make gcc warn if it can't inline a function.

Explicitly inline several functions (including moving VectorNormalize to
mathlib.h so it /can/ be) resulting in a 5.5% speedup for spam2 (88 to 92
fps)
This commit is contained in:
Bill Currie 2003-08-11 06:05:07 +00:00
parent b88d275994
commit 7ead5a91f8
12 changed files with 62 additions and 61 deletions

View file

@ -41,6 +41,7 @@ static __attribute__ ((unused)) const char rcsid[] =
#include <math.h>
#define IMPLEMENT_R_Cull
#define IMPLEMENT_VectorNormalize
#include "QF/mathlib.h"
#include "QF/qtypes.h"
@ -439,25 +440,6 @@ _VectorLength (const vec3_t v)
return length;
}
float
VectorNormalize (vec3_t v)
{
float length;
length = DotProduct (v, v);
if (length) {
float ilength;
length = sqrt (length);
ilength = 1.0 / length;
v[0] *= ilength;
v[1] *= ilength;
v[2] *= ilength;
}
return length;
}
vec_t
_VectorNormalize (vec3_t v)
{