Explicitly specify types to silence "Messaging unqualified id" warning that's new in Xcode 10.

Removed __has_feature(objc_generics) check and use generisc to help silence the warnings.
This commit is contained in:
Kent Sutherland committed 2018-06-14 21:22:38 +02:00
1 parent 89ce79488c
commit d574574345
27 files changed
+67 -79

No files matched your search

+1 -1
View File
@@ -32,7 +32,7 @@
NSURL *url = [coreServices URLByAppendingPathComponent:@"SystemVersion.plist"];
assert(url != nil);
NSDictionary *dictionary = [NSDictionary dictionaryWithContentsOfURL:url];
NSArray *components = [ [dictionary objectForKey: @"ProductVersion"] componentsSeparatedByString:@"."];
NSArray<NSString *> *components = [ (NSString *)[dictionary objectForKey: @"ProductVersion"] componentsSeparatedByString:@"."];
version.majorVersion = components.count > 0 ? [ [components objectAtIndex:0] integerValue] : 0;
version.minorVersion = components.count > 1 ? [ [components objectAtIndex:1] integerValue] : 0;
version.patchVersion = components.count > 2 ? [ [components objectAtIndex:2] integerValue] : 0;