Fix build error in wxOSX clang C++11 build for i386

When building for i386 in C++11 mode clang warns about narrowing conversion
from double to CGFloat (== float) in the initialization.

Fix it by using explicit suffixes for the float literals.
This commit is contained in:
Vadim Zeitlin
2016-02-29 18:05:02 +01:00
parent 173ecd77c4
commit ee486dba32

View File

@@ -2276,7 +2276,7 @@ void wxMacCoreGraphicsContext::DoDrawText( const wxString &str, wxDouble x, wxDo
{ {
CGFloat width = CTLineGetTypographicBounds(line, NULL, NULL, NULL); CGFloat width = CTLineGetTypographicBounds(line, NULL, NULL, NULL);
CGFloat height = CTFontGetXHeight( font ); CGFloat height = CTFontGetXHeight( font );
CGPoint points[] = { {0.0, height * 0.6}, {width, height * 0.6} }; CGPoint points[] = { {0.0, height * 0.6f}, {width, height * 0.6f} };
CGContextSetStrokeColorWithColor(m_cgContext, col); CGContextSetStrokeColorWithColor(m_cgContext, col);
CGContextSetShouldAntialias(m_cgContext, false); CGContextSetShouldAntialias(m_cgContext, false);
CGContextSetLineWidth(m_cgContext, 1.0); CGContextSetLineWidth(m_cgContext, 1.0);