From 27c5fd76ff0c65f479f00cdf07923a3240cf3506 Mon Sep 17 00:00:00 2001 From: dhewg Date: Thu, 22 Dec 2011 12:27:09 +0100 Subject: [PATCH] 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. --- d3xp/Light.cpp | 10 ++++++++++ d3xp/Light.h | 1 + game/Light.cpp | 10 ++++++++++ game/Light.h | 1 + idlib/math/Simd_SSE.h | 3 +++ idlib/math/Simd_SSE2.h | 2 ++ 6 files changed, 27 insertions(+) diff --git a/d3xp/Light.cpp b/d3xp/Light.cpp index 7bbb149..98b7995 100644 --- a/d3xp/Light.cpp +++ b/d3xp/Light.cpp @@ -481,6 +481,16 @@ void idLight::SetColor( float red, float green, float blue ) { SetLightLevel(); } +/* +================ +idLight::SetColor +================ +*/ +void idLight::SetColor( const idVec3 &color ) { + baseColor = color; + SetLightLevel(); +} + /* ================ idLight::SetColor diff --git a/d3xp/Light.h b/d3xp/Light.h index 851bf02..340a0b9 100644 --- a/d3xp/Light.h +++ b/d3xp/Light.h @@ -64,6 +64,7 @@ public: void SaveState( idDict *args ); virtual void SetColor( float red, float green, float blue ); + virtual void SetColor( const idVec3 &color ); virtual void SetColor( const idVec4 &color ); virtual void GetColor( idVec3 &out ) const; virtual void GetColor( idVec4 &out ) const; diff --git a/game/Light.cpp b/game/Light.cpp index b1b3a79..558e04e 100644 --- a/game/Light.cpp +++ b/game/Light.cpp @@ -474,6 +474,16 @@ void idLight::SetColor( float red, float green, float blue ) { SetLightLevel(); } +/* +================ +idLight::SetColor +================ +*/ +void idLight::SetColor( const idVec3 &color ) { + baseColor = color; + SetLightLevel(); +} + /* ================ idLight::SetColor diff --git a/game/Light.h b/game/Light.h index 851bf02..340a0b9 100644 --- a/game/Light.h +++ b/game/Light.h @@ -64,6 +64,7 @@ public: void SaveState( idDict *args ); virtual void SetColor( float red, float green, float blue ); + virtual void SetColor( const idVec3 &color ); virtual void SetColor( const idVec4 &color ); virtual void GetColor( idVec3 &out ) const; virtual void GetColor( idVec4 &out ) const; diff --git a/idlib/math/Simd_SSE.h b/idlib/math/Simd_SSE.h index e9deef1..752894d 100644 --- a/idlib/math/Simd_SSE.h +++ b/idlib/math/Simd_SSE.h @@ -42,6 +42,9 @@ If you have questions concerning this license or the applicable additional terms class idSIMD_SSE : public idSIMD_MMX { public: #if defined(__GNUC__) && defined(__SSE__) + using idSIMD_MMX::Dot; + using idSIMD_MMX::MinMax; + 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 MinMax( idVec3 &min, idVec3 &max, const idDrawVert *src, const int *indexes, const int count ); diff --git a/idlib/math/Simd_SSE2.h b/idlib/math/Simd_SSE2.h index 34992cc..ed880d3 100644 --- a/idlib/math/Simd_SSE2.h +++ b/idlib/math/Simd_SSE2.h @@ -42,6 +42,8 @@ If you have questions concerning this license or the applicable additional terms class idSIMD_SSE2 : public idSIMD_SSE { public: #if defined(__GNUC__) && defined(__SSE2__) + using idSIMD_SSE::CmpLT; + 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 );