Permalink
Browse files

Changing parameter of “-diff_levenshtein:” to immutable array.

This is to signal the guarantee, that the array will not be changes.
  • Loading branch information...
1 parent 6bf1284 commit 6f29026f24f5856c8c53f9081f8a32a7df7af8c2 @JanX2 committed Sep 6, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 DiffMatchPatch.h
  2. +2 −2 DiffMatchPatch.m
View
@@ -144,7 +144,7 @@ typedef enum {
- (NSString *)diff_prettyHtml:(NSMutableArray *)diffs;
- (NSString *)diff_text1:(NSMutableArray *)diffs;
- (NSString *)diff_text2:(NSMutableArray *)diffs;
-- (NSUInteger)diff_levenshtein:(NSMutableArray *)diffs;
+- (NSUInteger)diff_levenshtein:(NSArray *)diffs;
- (NSString *)diff_toDelta:(NSMutableArray *)diffs;
- (NSMutableArray *)diff_fromDeltaWithText:(NSString *)text1 andDelta:(NSString *)delta error:(NSError **)error;
View
@@ -1670,10 +1670,10 @@ - (NSUInteger)diff_xIndexIn:(NSMutableArray *)diffs
/**
* Compute the Levenshtein distance; the number of inserted, deleted or
* substituted characters.
- * @param diffs NSMutableArray of Diff objects.
+ * @param diffs NSArray of Diff objects.
* @return Number of changes.
*/
-- (NSUInteger)diff_levenshtein:(NSMutableArray *)diffs;
+- (NSUInteger)diff_levenshtein:(NSArray *)diffs;
{
NSUInteger levenshtein = 0;
NSUInteger insertions = 0;

0 comments on commit 6f29026

Please sign in to comment.