Fix -Woverloaded-virtual warnings

We want to use the SIMD functions of the base class if the
deriving class does not implement every overloaded variant.

Added missing idLight::SetColor(idVec3) which is declared in
idEntity.
This commit is contained in:
dhewg 2011-12-22 12:27:09 +01:00 committed by Daniel Gibson
parent 444da3574d
commit 27c5fd76ff
6 changed files with 27 additions and 0 deletions

View file

@ -481,6 +481,16 @@ void idLight::SetColor( float red, float green, float blue ) {
SetLightLevel(); SetLightLevel();
} }
/*
================
idLight::SetColor
================
*/
void idLight::SetColor( const idVec3 &color ) {
baseColor = color;
SetLightLevel();
}
/* /*
================ ================
idLight::SetColor idLight::SetColor

View file

@ -64,6 +64,7 @@ public:
void SaveState( idDict *args ); void SaveState( idDict *args );
virtual void SetColor( float red, float green, float blue ); virtual void SetColor( float red, float green, float blue );
virtual void SetColor( const idVec3 &color );
virtual void SetColor( const idVec4 &color ); virtual void SetColor( const idVec4 &color );
virtual void GetColor( idVec3 &out ) const; virtual void GetColor( idVec3 &out ) const;
virtual void GetColor( idVec4 &out ) const; virtual void GetColor( idVec4 &out ) const;

View file

@ -474,6 +474,16 @@ void idLight::SetColor( float red, float green, float blue ) {
SetLightLevel(); SetLightLevel();
} }
/*
================
idLight::SetColor
================
*/
void idLight::SetColor( const idVec3 &color ) {
baseColor = color;
SetLightLevel();
}
/* /*
================ ================
idLight::SetColor idLight::SetColor

View file

@ -64,6 +64,7 @@ public:
void SaveState( idDict *args ); void SaveState( idDict *args );
virtual void SetColor( float red, float green, float blue ); virtual void SetColor( float red, float green, float blue );
virtual void SetColor( const idVec3 &color );
virtual void SetColor( const idVec4 &color ); virtual void SetColor( const idVec4 &color );
virtual void GetColor( idVec3 &out ) const; virtual void GetColor( idVec3 &out ) const;
virtual void GetColor( idVec4 &out ) const; virtual void GetColor( idVec4 &out ) const;

View file

@ -42,6 +42,9 @@ If you have questions concerning this license or the applicable additional terms
class idSIMD_SSE : public idSIMD_MMX { class idSIMD_SSE : public idSIMD_MMX {
public: public:
#if defined(__GNUC__) && defined(__SSE__) #if defined(__GNUC__) && defined(__SSE__)
using idSIMD_MMX::Dot;
using idSIMD_MMX::MinMax;
virtual const char * VPCALL GetName( void ) const; virtual const char * VPCALL GetName( void ) const;
virtual void VPCALL Dot( float *dst, const idPlane &constant,const idDrawVert *src, const int count ); virtual void VPCALL Dot( float *dst, const idPlane &constant,const idDrawVert *src, const int count );
virtual void VPCALL MinMax( idVec3 &min, idVec3 &max, const idDrawVert *src, const int *indexes, const int count ); virtual void VPCALL MinMax( idVec3 &min, idVec3 &max, const idDrawVert *src, const int *indexes, const int count );

View file

@ -42,6 +42,8 @@ If you have questions concerning this license or the applicable additional terms
class idSIMD_SSE2 : public idSIMD_SSE { class idSIMD_SSE2 : public idSIMD_SSE {
public: public:
#if defined(__GNUC__) && defined(__SSE2__) #if defined(__GNUC__) && defined(__SSE2__)
using idSIMD_SSE::CmpLT;
virtual const char * VPCALL GetName( void ) const; virtual const char * VPCALL GetName( void ) const;
virtual void VPCALL CmpLT( byte *dst, const byte bitNum, const float *src0, const float constant, const int count ); virtual void VPCALL CmpLT( byte *dst, const byte bitNum, const float *src0, const float constant, const int count );