Fix the wrong declaration of NSArray generics
This commit is contained in:
parent
dc5c974b89
commit
bb5bd74b81
|
@ -39,7 +39,7 @@
|
|||
/**
|
||||
All coders in coders manager. The coders array is a priority queue, which means the later added coder will have the highest priority
|
||||
*/
|
||||
@property (nonatomic, strong, readwrite, nullable) NSArray<SDWebImageCoder>* coders;
|
||||
@property (nonatomic, strong, readwrite, nullable) NSArray<id<SDWebImageCoder>> *coders;
|
||||
|
||||
/**
|
||||
Add a new coder to the end of coders array. Which has the highest priority.
|
||||
|
|
|
@ -59,15 +59,15 @@
|
|||
});
|
||||
}
|
||||
|
||||
- (NSArray<SDWebImageCoder> *)coders {
|
||||
__block NSArray<SDWebImageCoder> *sortedCoders = nil;
|
||||
- (NSArray<id<SDWebImageCoder>> *)coders {
|
||||
__block NSArray<id<SDWebImageCoder>> *sortedCoders = nil;
|
||||
dispatch_sync(self.mutableCodersAccessQueue, ^{
|
||||
sortedCoders = (NSArray<SDWebImageCoder> *)[[[self.mutableCoders copy] reverseObjectEnumerator] allObjects];
|
||||
sortedCoders = (NSArray<id<SDWebImageCoder>> *)[[[self.mutableCoders copy] reverseObjectEnumerator] allObjects];
|
||||
});
|
||||
return sortedCoders;
|
||||
}
|
||||
|
||||
- (void)setCoders:(NSArray<SDWebImageCoder> *)coders {
|
||||
- (void)setCoders:(NSArray<id<SDWebImageCoder>> *)coders {
|
||||
dispatch_barrier_sync(self.mutableCodersAccessQueue, ^{
|
||||
self.mutableCoders = [coders mutableCopy];
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue