Add type annotations to dictionaries

This commit is contained in:
Kovid Goyal 2022-01-13 16:29:13 +05:30
parent a819023ab7
commit 96b46c554e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -513,11 +513,11 @@ typedef enum AppleShortcutNames {
kSHKTurnFocusFollowingOnOrOff = 179, // kSHKTurnFocusFollowingOnOrOff = 179, //
} AppleShortcutNames; } AppleShortcutNames;
static NSDictionary *global_shortcuts = nil; static NSDictionary<NSString*,NSNumber*> *global_shortcuts = nil;
static void static void
build_global_shortcuts_lookup(void) { build_global_shortcuts_lookup(void) {
NSMutableDictionary *temp = [NSMutableDictionary dictionaryWithCapacity:128]; // will be autoreleased NSMutableDictionary<NSString*, NSNumber*> *temp = [NSMutableDictionary dictionaryWithCapacity:128]; // will be autoreleased
NSDictionary *apple_settings = [[NSUserDefaults standardUserDefaults] persistentDomainForName:@"com.apple.symbolichotkeys"]; NSDictionary *apple_settings = [[NSUserDefaults standardUserDefaults] persistentDomainForName:@"com.apple.symbolichotkeys"];
if (apple_settings) { if (apple_settings) {
NSDictionary<NSString*, id> *symbolic_hotkeys = [apple_settings objectForKey:@"AppleSymbolicHotKeys"]; NSDictionary<NSString*, id> *symbolic_hotkeys = [apple_settings objectForKey:@"AppleSymbolicHotKeys"];