Fix warnings caused by -Wpartial-availability

Most of this is removing Obj-C subscripting usage
Some bits are adding pragma ignores to places where we are careful to not use the API at runtime on older OS's

Note that for NSMutableDictionary:
x[y] = z is not the same as [x setObject:z forKey:y]

In particular, z can be nil for subscripting (removing the element if it exists) where it cannot for setObject:forKey:
Personally I like the non-subscripting semantics better. Most cases we were using this we were checking if the object was non-nil anyway
This commit is contained in:
Zorg committed 2016-03-22 22:07:49 -04:00
1 parent 2faf8ccdd2
commit c265e3f7bf
13 files changed
+78 -61

No files matched your search

+4
View File
@@ -28,7 +28,11 @@
return version;
}
#endif
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpartial-availability"
return [[NSProcessInfo processInfo] operatingSystemVersion];
#pragma clang diagnostic pop
}
+ (BOOL)isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion)version