From 436d8669eae4d95976b6d29b04c2f180ebc1ea67 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 1 Jan 2013 11:59:46 +0200 Subject: WaE: unused private field The fields were not really unused but the compiler can't know that, and it was done in a horribly hacky way anyway. Same fix as sberg did for the corresponding MacOSX code. (Yeah, should factor out the commonality. Not that I know whether the VCL code for iOS will ever be used.) Change-Id: I573073c3f5c15f0a40ed72c9d58578fc80f65b93 --- vcl/inc/ios/salgdicommon.hxx | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'vcl/inc/ios') diff --git a/vcl/inc/ios/salgdicommon.hxx b/vcl/inc/ios/salgdicommon.hxx index 5a73f3744fc7..c27ebef8d987 100644 --- a/vcl/inc/ios/salgdicommon.hxx +++ b/vcl/inc/ios/salgdicommon.hxx @@ -26,26 +26,28 @@ class RGBAColor public: RGBAColor( SalColor ); RGBAColor( float fRed, float fGreen, float fBlue, float fAlpha ); //NOTUSEDYET - const float* AsArray() const { return &m_fRed; } - bool IsVisible() const { return m_fAlpha > 0; } - void SetAlpha( float fAlpha ) { m_fAlpha = fAlpha; } + const CGFloat* AsArray() const { return m_fRGBA; } + bool IsVisible() const { return m_fRGBA[3] > 0; } + void SetAlpha( float fAlpha ) { m_fRGBA[3] = fAlpha; } private: - float m_fRed, m_fGreen, m_fBlue, m_fAlpha; + CGFloat m_fRGBA[4]; // red, green, blue, alpha }; inline RGBAColor::RGBAColor( SalColor nSalColor ) -: m_fRed( SALCOLOR_RED(nSalColor) * (1.0/255)) -, m_fGreen( SALCOLOR_GREEN(nSalColor) * (1.0/255)) -, m_fBlue( SALCOLOR_BLUE(nSalColor) * (1.0/255)) -, m_fAlpha( 1.0 ) // opaque -{} +{ + m_fRGBA[0] = SALCOLOR_RED(nSalColor) * (1.0/255); + m_fRGBA[1] = SALCOLOR_GREEN(nSalColor) * (1.0/255); + m_fRGBA[2] = SALCOLOR_BLUE(nSalColor) * (1.0/255); + m_fRGBA[3] = 1.0; // opaque +} inline RGBAColor::RGBAColor( float fRed, float fGreen, float fBlue, float fAlpha ) -: m_fRed( fRed ) -, m_fGreen( fGreen ) -, m_fBlue( fBlue ) -, m_fAlpha( fAlpha ) -{} +{ + m_fRGBA[0] = fRed; + m_fRGBA[1] = fGreen; + m_fRGBA[2] = fBlue; + m_fRGBA[3] = fAlpha; +} class XorEmulation { -- cgit