From ee486dba32d02c744ae4007940f41a5b24b8c574 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 29 Feb 2016 18:05:02 +0100 Subject: [PATCH] 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. --- src/osx/carbon/graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp index 091c2c271b..2d9cb960f0 100644 --- a/src/osx/carbon/graphics.cpp +++ b/src/osx/carbon/graphics.cpp @@ -2276,7 +2276,7 @@ void wxMacCoreGraphicsContext::DoDrawText( const wxString &str, wxDouble x, wxDo { CGFloat width = CTLineGetTypographicBounds(line, NULL, NULL, NULL); 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); CGContextSetShouldAntialias(m_cgContext, false); CGContextSetLineWidth(m_cgContext, 1.0);