diff options
author | Michael Lutz <michi@icosahedron.de> | 2018-01-28 23:01:10 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2018-04-10 23:30:01 +0200 |
commit | 74b7f0a9aa7658857714db365853db8f6c8512bd (patch) | |
tree | 6a7dcd9456458fa5212236c90a4044542e040ec4 /src/os | |
parent | fa587ad3cc214351fc4de0500ca7b274f0955741 (diff) | |
download | openttd-74b7f0a9aa7658857714db365853db8f6c8512bd.tar.xz |
Fix: [OSX] Remove some OSX compiler warnings on newer SDKs/compilers.
Diffstat (limited to 'src/os')
-rw-r--r-- | src/os/macosx/macos.mm | 8 |
1 files changed, 6 insertions, 2 deletions
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; } |