From 74b7f0a9aa7658857714db365853db8f6c8512bd Mon Sep 17 00:00:00 2001 From: Michael Lutz Date: Sun, 28 Jan 2018 23:01:10 +0100 Subject: Fix: [OSX] Remove some OSX compiler warnings on newer SDKs/compilers. --- src/os/macosx/macos.mm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/os/macosx') diff --git a/src/os/macosx/macos.mm b/src/os/macosx/macos.mm index 8d34cda58..087630332 100644 --- a/src/os/macosx/macos.mm +++ b/src/os/macosx/macos.mm @@ -21,6 +21,10 @@ #undef Rect #undef Point +#ifndef __clang__ +#define __bridge +#endif + /* * This file contains objective C * Apple uses objective C instead of plain C to interact with OS specific/native functions @@ -182,7 +186,7 @@ uint GetCPUCoreCount() uint count = 1; #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) if (MacOSVersionIsAtLeast(10, 5, 0)) { - count = [ [ NSProcessInfo processInfo ] activeProcessorCount ]; + count = (uint)[ [ NSProcessInfo processInfo ] activeProcessorCount ]; } else #endif { @@ -201,7 +205,7 @@ uint GetCPUCoreCount() */ bool IsMonospaceFont(CFStringRef name) { - NSFont *font = [ NSFont fontWithName:(NSString *)name size:0.0f ]; + NSFont *font = [ NSFont fontWithName:(__bridge NSString *)name size:0.0f ]; return font != NULL ? [ font isFixedPitch ] : false; } -- cgit v1.2.3-70-g09d2