Skip to content

Commit

Permalink
Fix compiler warning in Xcode 8.3.
Browse files Browse the repository at this point in the history
Fixes nolanw#75. Implements nolanw#76 using nullability specifiers that are covered by HTMLSupport.h so they'll still work with old compilers.
  • Loading branch information
nolanw committed Mar 28, 2017
1 parent 0ce436c commit 0ef2199
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/HTMLOrderedDictionary.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ - (instancetype)initWithCapacity:(NSUInteger)numItems
// Diagnostic needs ignoring on iOS 5.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmismatched-parameter-types"
- (instancetype)initWithObjects:(const id [])objects forKeys:(const id<NSCopying> [])keys count:(NSUInteger)count
- (instancetype)initWithObjects:(const id __nonnull [])objects forKeys:(const id<NSCopying> __nonnull [])keys count:(NSUInteger)count
#pragma clang diagnostic pop
{
if ((self = [self initWithCapacity:count])) {
Expand Down Expand Up @@ -157,7 +157,7 @@ - (id)objectAtIndexedSubscript:(NSUInteger)index
return _keys[index];
}

- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(__unsafe_unretained id [])buffer count:(NSUInteger)len
- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(__unsafe_unretained id __nonnull [])buffer count:(NSUInteger)len
{
return [_keys countByEnumeratingWithState:state objects:buffer count:len];
}
Expand Down

0 comments on commit 0ef2199

Please sign in to comment.