回忆昨天,珍惜今天,期待明天
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 for ( NSInteger i = 0 ; i < newCount; i++) { IGListEntry *entry = newResultsArray[i].entry; // grab and pop the top original index. if the item was inserted this will be NSNotFound NSCAssert (!entry->oldIndexes.empty(), @"Old indexes is empty while iterating new item %li. Should have NSNotFound" , ( long )i); const NSInteger originalIndex = entry->oldIndexes.top(); entry->oldIndexes.pop(); if (originalIndex <
在newResultArray 中,代码的判断 record.index == NSNotFound ,那就属于要被添加进去的