Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit 8f3e511

Browse files
committed
Fix warning
1 parent fc5eef3 commit 8f3e511

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

AsyncDisplayKit/Private/ASMultidimensionalArrayUtils.mm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ static void ASRecursivelyFindIndexPathsForMultidimensionalArray(NSObject *obj, N
5353
}
5454
}
5555

56-
static BOOL ASElementExistsAtIndexPath(NSMutableArray *mutableArray, NSIndexPath *indexPath) {
56+
static BOOL ASElementExistsAtIndexPathForMultidimensionalArray(NSArray *array, NSIndexPath *indexPath) {
5757
NSUInteger indexLength = indexPath.length;
5858
ASDisplayNodeCAssert(indexLength != 0, @"Must have a non-zero indexPath length");
5959
NSUInteger firstIndex = [indexPath indexAtPosition:0];
60-
BOOL elementExists = firstIndex < mutableArray.count;
60+
BOOL elementExists = firstIndex < array.count;
6161

6262
if (indexLength == 1) {
6363
return elementExists;
@@ -67,7 +67,7 @@ static BOOL ASElementExistsAtIndexPath(NSMutableArray *mutableArray, NSIndexPath
6767
return NO;
6868
}
6969

70-
return ASElementExistsAtIndexPath(mutableArray[firstIndex], [indexPath indexPathByRemovingLastIndex]);
70+
return ASElementExistsAtIndexPathForMultidimensionalArray(array[firstIndex], [indexPath indexPathByRemovingLastIndex]);
7171
}
7272

7373
#pragma mark - Public Methods
@@ -163,7 +163,7 @@ void ASDeleteElementsInMultidimensionalArrayAtIndexPaths(NSMutableArray *mutable
163163
{
164164
NSMutableArray *res = [NSMutableArray array];
165165
for (NSIndexPath *indexPath in indexPaths) {
166-
if (ASElementExistsAtIndexPath(multidimensionalArray, indexPath)) {
166+
if (ASElementExistsAtIndexPathForMultidimensionalArray(multidimensionalArray, indexPath)) {
167167
[res addObject:indexPath];
168168
}
169169
}

0 commit comments

Comments
 (0)