Don't check for always-available CGColorCreateGenericRGB

This function is available on OS X since 10.5, which is the minimum
supported version of wx 3.0.

Fixes Xcode 6.3 warning triggered by checking availability of a symbol
that wasn't marked as weak_import.
This commit is contained in:
Vaclav Slavik 2015-04-19 13:15:09 +02:00
parent 3c70847bea
commit 144d03880f

View File

@ -70,14 +70,11 @@ void wxColour::InitRGBA (ChannelType r, ChannelType g, ChannelType b, ChannelTyp
CGColorRef col = 0 ; CGColorRef col = 0 ;
#if wxOSX_USE_COCOA_OR_CARBON #if wxOSX_USE_COCOA_OR_CARBON
if ( CGColorCreateGenericRGB != NULL ) col = CGColorCreateGenericRGB( (CGFloat)(r / 255.0), (CGFloat) (g / 255.0), (CGFloat) (b / 255.0), (CGFloat) (a / 255.0) );
col = CGColorCreateGenericRGB( (CGFloat)(r / 255.0), (CGFloat) (g / 255.0), (CGFloat) (b / 255.0), (CGFloat) (a / 255.0) ); #else
else CGFloat components[4] = { (CGFloat)(r / 255.0), (CGFloat) (g / 255.0), (CGFloat) (b / 255.0), (CGFloat) (a / 255.0) } ;
col = CGColorCreate( wxMacGetGenericRGBColorSpace() , components ) ;
#endif #endif
{
CGFloat components[4] = { (CGFloat)(r / 255.0), (CGFloat) (g / 255.0), (CGFloat) (b / 255.0), (CGFloat) (a / 255.0) } ;
col = CGColorCreate( wxMacGetGenericRGBColorSpace() , components ) ;
}
wxASSERT_MSG(col != NULL, "Invalid CoreGraphics Color"); wxASSERT_MSG(col != NULL, "Invalid CoreGraphics Color");
m_cgColour.reset( col ); m_cgColour.reset( col );
} }