pulling in some simple code fixes suggested towards XCode 4.2 support

This commit is contained in:
Timothee 'TTimo' Besset
2011-12-10 18:27:30 -06:00
parent f1f80640fb
commit 7db8be7917
7 changed files with 11 additions and 13 deletions

View File

@@ -148,7 +148,7 @@ ID_INLINE int idVectorSet<type,dimension>::FindVector( const type &v, const floa
}
hash.Add( hashKey, idList<type>::Num() );
Append( v );
this->Append( v );
return idList<type>::Num()-1;
}

View File

@@ -333,7 +333,7 @@ idCurve::SetConstantSpeed
*/
template< class type >
ID_INLINE void idCurve<type>::SetConstantSpeed( const float totalTime ) {
int i, j;
int i;
float *length, totalLength, scale, t;
length = (float *) _alloca16( values.Num() * sizeof( float ) );
@@ -777,7 +777,7 @@ idCurve_QuadraticBezier::BasisSecondDerivative
*/
template< class type >
ID_INLINE void idCurve_QuadraticBezier<type>::BasisSecondDerivative( const float t, float *bvals ) const {
float s1 = (float) ( t - this->times[0] ) / ( this->times[2] - this->times[0] );
// float s1 = (float) ( t - this->times[0] ) / ( this->times[2] - this->times[0] );
bvals[0] = 2.0f;
bvals[1] = -4.0f;
bvals[2] = 2.0f;

View File

@@ -31,7 +31,9 @@ If you have questions concerning this license or the applicable additional terms
#ifdef MACOS_X
// for square root estimate instruction
#ifdef PPC_INTRINSICS
#include <ppc_intrinsics.h>
#endif
// for FLT_MIN
#include <float.h>
#endif

View File

@@ -93,7 +93,7 @@ If you have questions concerning this license or the applicable additional terms
// This turns on support for PPC intrinsics in the SIMD_AltiVec.cpp file. Right now it's only used for frsqrte. GCC
// supports these intrinsics but XLC does not.
#define PPC_INTRINSICS
//#define PPC_INTRINSICS
// This assumes that the idDrawVert array that is used in DeriveUnsmoothedTangents is aligned. If its not aligned,
// then we don't get any speedup