remove redundant cast

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

View File

@ -525,7 +525,7 @@ build_global_shortcuts_lookup(void) {
for (NSString *key in symbolic_hotkeys) { for (NSString *key in symbolic_hotkeys) {
id obj = symbolic_hotkeys[key]; id obj = symbolic_hotkeys[key];
if (![key isKindOfClass:[NSString class]] || ![obj isKindOfClass:[NSDictionary class]]) continue; if (![key isKindOfClass:[NSString class]] || ![obj isKindOfClass:[NSDictionary class]]) continue;
NSInteger sc = [(NSString*)key integerValue]; NSInteger sc = [key integerValue];
NSDictionary *sc_value = obj; NSDictionary *sc_value = obj;
id enabled = [sc_value objectForKey:@"enabled"]; id enabled = [sc_value objectForKey:@"enabled"];
if (!enabled || ![enabled isKindOfClass:[NSNumber class]] || ![(NSNumber*)enabled boolValue]) continue; if (!enabled || ![enabled isKindOfClass:[NSNumber class]] || ![(NSNumber*)enabled boolValue]) continue;