Kaydet (Commit) 436d8669 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

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
üst 993c3bff
...@@ -26,26 +26,28 @@ class RGBAColor ...@@ -26,26 +26,28 @@ class RGBAColor
public: public:
RGBAColor( SalColor ); RGBAColor( SalColor );
RGBAColor( float fRed, float fGreen, float fBlue, float fAlpha ); //NOTUSEDYET RGBAColor( float fRed, float fGreen, float fBlue, float fAlpha ); //NOTUSEDYET
const float* AsArray() const { return &m_fRed; } const CGFloat* AsArray() const { return m_fRGBA; }
bool IsVisible() const { return m_fAlpha > 0; } bool IsVisible() const { return m_fRGBA[3] > 0; }
void SetAlpha( float fAlpha ) { m_fAlpha = fAlpha; } void SetAlpha( float fAlpha ) { m_fRGBA[3] = fAlpha; }
private: private:
float m_fRed, m_fGreen, m_fBlue, m_fAlpha; CGFloat m_fRGBA[4]; // red, green, blue, alpha
}; };
inline RGBAColor::RGBAColor( SalColor nSalColor ) inline RGBAColor::RGBAColor( SalColor nSalColor )
: m_fRed( SALCOLOR_RED(nSalColor) * (1.0/255)) {
, m_fGreen( SALCOLOR_GREEN(nSalColor) * (1.0/255)) m_fRGBA[0] = SALCOLOR_RED(nSalColor) * (1.0/255);
, m_fBlue( SALCOLOR_BLUE(nSalColor) * (1.0/255)) m_fRGBA[1] = SALCOLOR_GREEN(nSalColor) * (1.0/255);
, m_fAlpha( 1.0 ) // opaque 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 ) inline RGBAColor::RGBAColor( float fRed, float fGreen, float fBlue, float fAlpha )
: m_fRed( fRed ) {
, m_fGreen( fGreen ) m_fRGBA[0] = fRed;
, m_fBlue( fBlue ) m_fRGBA[1] = fGreen;
, m_fAlpha( fAlpha ) m_fRGBA[2] = fBlue;
{} m_fRGBA[3] = fAlpha;
}
class XorEmulation class XorEmulation
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment