mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-16 03:09:56 +00:00
[Documentation] Add a comment why we prefer -indexPathForItem:inSection:
This commit is contained in:
parent
457e08005f
commit
77f24231b3
@ -79,6 +79,7 @@ static BOOL ASElementExistsAtIndexPathForMultidimensionalArray(NSArray *array, N
|
||||
NSUInteger indexes[indexesLength];
|
||||
[indexPath getIndexes:indexes range:NSMakeRange(1, indexesLength)];
|
||||
NSIndexPath *indexPathByRemovingFirstIndex;
|
||||
// Use -indexPathForItem:inSection: if possible because it does not allocate into the heap
|
||||
if (indexesLength == 2) {
|
||||
indexPathByRemovingFirstIndex = [NSIndexPath indexPathForItem:indexes[1] inSection:indexes[0]];
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user