diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-01-01 11:59:46 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-01-01 12:18:22 +0200 |
commit | 436d8669eae4d95976b6d29b04c2f180ebc1ea67 (patch) | |
tree | b50226c16b4a0bc90a86af501d6fb405d6367477 /vcl/inc/ios | |
parent | 993c3bff0173f5c9f8941e6b036d3e57f4b68cf1 (diff) |
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
Diffstat (limited to 'vcl/inc/ios')
-rw-r--r-- | vcl/inc/ios/salgdicommon.hxx | 30 |
1 files changed, 16 insertions, 14 deletions
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 { |