mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 20:16:10 +08:00
Modified SDK for GCC 4.2
This commit is contained in:
@ -18,7 +18,9 @@
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning (disable : 4700) // local variable 'x' used without having been initialized
|
||||
#endif
|
||||
|
||||
// ------------------------------------------------------------------------------------------- //
|
||||
// Helper functions.
|
||||
@ -726,7 +728,7 @@ void Vector4DMultiplyPosition( const VMatrix& src1, Vector const& src2, Vector4D
|
||||
{
|
||||
// Make sure it works if src2 == dst
|
||||
Vector tmp;
|
||||
Vector const&v = ( &src2 == &dst.AsVector3D() ) ? static_cast<const Vector>(tmp) : src2;
|
||||
Vector const&v = ( &src2 == &dst.AsVector3D() ) ? tmp : src2;
|
||||
|
||||
if (&src2 == &dst.AsVector3D())
|
||||
{
|
||||
@ -749,7 +751,7 @@ void Vector3DMultiply( const VMatrix &src1, const Vector &src2, Vector &dst )
|
||||
{
|
||||
// Make sure it works if src2 == dst
|
||||
Vector tmp;
|
||||
const Vector &v = (&src2 == &dst) ? static_cast<const Vector>(tmp) : src2;
|
||||
const Vector &v = (&src2 == &dst) ? tmp : src2;
|
||||
|
||||
if( &src2 == &dst )
|
||||
{
|
||||
@ -770,7 +772,7 @@ void Vector3DMultiplyPositionProjective( const VMatrix& src1, const Vector &src2
|
||||
{
|
||||
// Make sure it works if src2 == dst
|
||||
Vector tmp;
|
||||
const Vector &v = (&src2 == &dst) ? static_cast<const Vector>(tmp): src2;
|
||||
const Vector &v = (&src2 == &dst) ? tmp: src2;
|
||||
if( &src2 == &dst )
|
||||
{
|
||||
VectorCopy( src2, tmp );
|
||||
@ -797,7 +799,7 @@ void Vector3DMultiplyProjective( const VMatrix& src1, const Vector &src2, Vector
|
||||
{
|
||||
// Make sure it works if src2 == dst
|
||||
Vector tmp;
|
||||
const Vector &v = (&src2 == &dst) ? static_cast<const Vector>(tmp) : src2;
|
||||
const Vector &v = (&src2 == &dst) ? tmp : src2;
|
||||
if( &src2 == &dst )
|
||||
{
|
||||
VectorCopy( src2, tmp );
|
||||
@ -850,7 +852,7 @@ void Vector3DMultiplyTranspose( const VMatrix& src1, const Vector& src2, Vector&
|
||||
bool srcEqualsDst = (&src2 == &dst);
|
||||
|
||||
Vector tmp;
|
||||
const Vector&v = srcEqualsDst ? static_cast<const Vector>(tmp) : src2;
|
||||
const Vector&v = srcEqualsDst ? tmp : src2;
|
||||
|
||||
if (srcEqualsDst)
|
||||
{
|
||||
|
Reference in New Issue
Block a user