Skip to content

Commit 80af38a

Browse files
author
Neil Fraser
committed
Rename variable.
Resolves error when compiling JS strictly.
1 parent 9ba149b commit 80af38a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

objectivec/DiffMatchPatch.m

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -560,10 +560,10 @@ - (NSMutableArray *)diff_lineModeFromOldString:(NSString *)text1
560560
deadline:(NSTimeInterval)deadline;
561561
{
562562
// Scan the text on a line-by-line basis first.
563-
NSArray *b = [self diff_linesToCharsForFirstString:text1 andSecondString:text2];
564-
text1 = (NSString *)[b objectAtIndex:0];
565-
text2 = (NSString *)[b objectAtIndex:1];
566-
NSMutableArray *linearray = (NSMutableArray *)[b objectAtIndex:2];
563+
NSArray *a = [self diff_linesToCharsForFirstString:text1 andSecondString:text2];
564+
text1 = (NSString *)[a objectAtIndex:0];
565+
text2 = (NSString *)[a objectAtIndex:1];
566+
NSMutableArray *linearray = (NSMutableArray *)[a objectAtIndex:2];
567567

568568
NSAutoreleasePool *recursePool = [NSAutoreleasePool new];
569569
NSMutableArray *diffs = [self diff_mainOfOldString:text1 andNewString:text2 checkLines:NO deadline:deadline];
@@ -599,16 +599,16 @@ - (NSMutableArray *)diff_lineModeFromOldString:(NSString *)text1
599599
// Upon reaching an equality, check for prior redundancies.
600600
if (count_delete >= 1 && count_insert >= 1) {
601601
// Delete the offending records and add the merged ones.
602-
NSMutableArray *a = [self diff_mainOfOldString:text_delete andNewString:text_insert checkLines:NO deadline:deadline];
602+
NSMutableArray *subDiff = [self diff_mainOfOldString:text_delete andNewString:text_insert checkLines:NO deadline:deadline];
603603
[diffs removeObjectsInRange:NSMakeRange(thisPointer - count_delete - count_insert,
604604
count_delete + count_insert)];
605605
thisPointer = thisPointer - count_delete - count_insert;
606606
NSUInteger insertionIndex = thisPointer;
607-
for (Diff *thisDiff in a) {
607+
for (Diff *thisDiff in subDiff) {
608608
[diffs insertObject:thisDiff atIndex:insertionIndex];
609609
insertionIndex++;
610610
}
611-
thisPointer = thisPointer + a.count;
611+
thisPointer = thisPointer + subDiff.count;
612612
}
613613
count_insert = 0;
614614
count_delete = 0;

0 commit comments

Comments
 (0)