Cocoa: Move slightly towards modern Objective-C

Inspired by 9a9568212c.
This commit is contained in:
Luflosi
2019-07-25 16:14:56 -05:00
parent 4f5264277e
commit cdbe2f13ca
3 changed files with 8 additions and 8 deletions

View File

@@ -59,7 +59,7 @@ static NSUInteger getStyleMask(_GLFWwindow* window)
CGDirectDisplayID displayIDForWindow(_GLFWwindow *w) {
NSWindow *nw = w->ns.object;
NSDictionary *dict = [nw.screen deviceDescription];
NSNumber *displayIDns = [dict objectForKey:@"NSScreenNumber"];
NSNumber *displayIDns = dict[@"NSScreenNumber"];
if (displayIDns) return [displayIDns unsignedIntValue];
return (CGDirectDisplayID)-1;
}
@@ -1275,7 +1275,7 @@ static void createMenuBar(void)
for (i = 0; i < sizeof(nameKeys) / sizeof(nameKeys[0]); i++)
{
id name = [bundleInfo objectForKey:nameKeys[i]];
id name = bundleInfo[nameKeys[i]];
if (name &&
[name isKindOfClass:[NSString class]] &&
![name isEqualToString:@""])