Fix: [OSX] Remove some OSX compiler warnings on newer SDKs/compilers.

This commit is contained in:
Michael Lutz
2018-01-28 23:01:10 +01:00
parent fa587ad3cc
commit 74b7f0a9aa
6 changed files with 53 additions and 11 deletions

View File

@@ -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;
}