diff options
author | Max Hilbrunner <mhilbrunner@users.noreply.github.com> | 2018-05-21 18:25:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-21 18:25:18 +0200 |
commit | bd39e0d864893c08471a1dcb6abae3c5df698139 (patch) | |
tree | 924dca5ce34c898a1a96afd86f9f88c320fd5b1b /platform/osx/os_osx.mm | |
parent | 689290d71b2ae52c8b00e444097d797c60872356 (diff) | |
parent | 875d822d77f3088793cb0b4320c08b8f4d40a03e (diff) |
Merge pull request #19081 from Faless/osxcross_fix2
Fix OSXCROSS build with clang-6.0
Diffstat (limited to 'platform/osx/os_osx.mm')
-rw-r--r-- | platform/osx/os_osx.mm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index bde0b4e898..cd20cc563b 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -913,7 +913,7 @@ static int remapKey(unsigned int key) { CFDataRef layoutData = (CFDataRef)TISGetInputSourceProperty(currentKeyboard, kTISPropertyUnicodeKeyLayoutData); if (!layoutData) - return nil; + return 0; const UCKeyboardLayout *keyboardLayout = (const UCKeyboardLayout *)CFDataGetBytePtr(layoutData); @@ -1740,7 +1740,8 @@ String OS_OSX::get_godot_dir_name() const { String OS_OSX::get_system_dir(SystemDir p_dir) const { - NSSearchPathDirectory id = 0; + NSSearchPathDirectory id; + bool found = true; switch (p_dir) { case SYSTEM_DIR_DESKTOP: { @@ -1761,10 +1762,13 @@ String OS_OSX::get_system_dir(SystemDir p_dir) const { case SYSTEM_DIR_PICTURES: { id = NSPicturesDirectory; } break; + default: { + found = false; + } } String ret; - if (id) { + if (found) { NSArray *paths = NSSearchPathForDirectoriesInDomains(id, NSUserDomainMask, YES); if (paths && [paths count] >= 1) { |