Permalink
Browse files

Doh! Should be NSInteger not NSUInteger.

  • Loading branch information...
1 parent 00b8c31 commit df1a29fe5ed92d8e6771761954dcc800a5d3b895 Danny Greg committed Dec 20, 2012
Showing with 9 additions and 5 deletions.
  1. +1 −1 Classes/GTDiffHunk.m
  2. +7 −3 Classes/GTDiffLine.h
  3. +1 −1 Classes/GTDiffLine.m
View
@@ -52,7 +52,7 @@ - (void)enumerateLinesInHunkUsingBlock:(void (^)(GTDiffLine *line, BOOL *stop))b
if (result != GIT_OK) continue;
NSString *lineString = [[[NSString alloc] initWithBytes:content length:contentLength encoding:NSUTF8StringEncoding] stringByTrimmingCharactersInSet:NSCharacterSet.newlineCharacterSet];
- GTDiffLine *line = [[GTDiffLine alloc] initWithContent:lineString oldLineNumber:(NSUInteger)oldLineNumber newLineNumber:(NSUInteger)newLineNumber origin:lineOrigin];
+ GTDiffLine *line = [[GTDiffLine alloc] initWithContent:lineString oldLineNumber:oldLineNumber newLineNumber:newLineNumber origin:lineOrigin];
BOOL stop = NO;
block(line, &stop);
if (stop) return;
View
@@ -26,15 +26,19 @@ typedef enum : git_diff_line_t {
@property (nonatomic, readonly) NSString *content;
// The line number of this line in the left side of the diff.
-@property (nonatomic, readonly) NSUInteger oldLineNumber;
+//
+// -1 if the line is an addition.
+@property (nonatomic, readonly) NSInteger oldLineNumber;
// The line number of this line in the right side of the diff.
-@property (nonatomic, readonly) NSUInteger newLineNumber;
+//
+// -1 if the line is a deletion.
+@property (nonatomic, readonly) NSInteger newLineNumber;
// The origin of the line, see the enum above for possible values.
@property (nonatomic, readonly) GTDiffLineOrigin origin;
// Designated initialiser.
-- (instancetype)initWithContent:(NSString *)content oldLineNumber:(NSUInteger)oldLineNumber newLineNumber:(NSUInteger)newLineNumber origin:(GTDiffLineOrigin)origin;
+- (instancetype)initWithContent:(NSString *)content oldLineNumber:(NSInteger)oldLineNumber newLineNumber:(NSInteger)newLineNumber origin:(GTDiffLineOrigin)origin;
@end
View
@@ -10,7 +10,7 @@
@implementation GTDiffLine
-- (instancetype)initWithContent:(NSString *)content oldLineNumber:(NSUInteger)oldLineNumber newLineNumber:(NSUInteger)newLineNumber origin:(GTDiffLineOrigin)origin {
+- (instancetype)initWithContent:(NSString *)content oldLineNumber:(NSInteger)oldLineNumber newLineNumber:(NSInteger)newLineNumber origin:(GTDiffLineOrigin)origin {
self = [super init];
if (self == nil) return nil;

0 comments on commit df1a29f

Please sign in to comment.