From 22dd148e280b979d1f0dd6c8b2aa2474e1ae919d Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 10 Jan 2011 21:45:03 -0500 Subject: [PATCH] Use NSUInteger in BSSourceView.{h,m} --- Source/BSSourceView.h | 8 ++++---- Source/BSSourceView.m | 6 +++--- Source/BreakpointController.m | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/BSSourceView.h b/Source/BSSourceView.h index 811f834..4f92f10 100644 --- a/Source/BSSourceView.h +++ b/Source/BSSourceView.h @@ -27,7 +27,7 @@ NSScrollView* scrollView; NSString* file; - int markedLine; + NSUInteger markedLine; id delegate; } @@ -36,12 +36,12 @@ @property(readwrite, assign) BSSourceViewTextView* textView; @property(readwrite, assign) NSScrollView* scrollView; @property(readwrite, nonatomic, assign) NSString* file; -@property(readwrite, assign) int markedLine; +@property(readwrite, assign) NSUInteger markedLine; @property(readwrite, assign) id delegate; - (void)setFile:(NSString*)f; - (void)setString:(NSString*)source asFile:(NSString*)path; -- (void)scrollToLine:(int)line; +- (void)scrollToLine:(NSUInteger)line; @end @@ -51,7 +51,7 @@ @optional // Notifies the delegate that the gutter was clicked at a certain line. -- (void)gutterClickedAtLine:(int)line forFile:(NSString*)file; +- (void)gutterClickedAtLine:(NSUInteger)line forFile:(NSString*)file; // Whether to accept a file drop. - (BOOL)sourceView:(BSSourceView*)sv acceptsDropOfFile:(NSString*)fileName; diff --git a/Source/BSSourceView.m b/Source/BSSourceView.m index 55481eb..209f972 100644 --- a/Source/BSSourceView.m +++ b/Source/BSSourceView.m @@ -152,14 +152,14 @@ /** * Tells the text view to scroll to a certain line */ -- (void)scrollToLine:(int)line +- (void)scrollToLine:(NSUInteger)line { if ([[textView textStorage] length] == 0) return; // go through the document until we find the NSRange for the line we want int rangeIndex = 0; - for (int i = 0; i < line; i++) + for (NSUInteger i = 0; i < line; i++) { rangeIndex = NSMaxRange([[textView string] lineRangeForRange:NSMakeRange(rangeIndex, 0)]); } @@ -175,7 +175,7 @@ */ - (void)setupViews { - int gutterWidth = 30; + NSUInteger gutterWidth = 30; // setup the line number view NSRect numberFrame = [self bounds]; diff --git a/Source/BreakpointController.m b/Source/BreakpointController.m index f50a63c..9645b43 100644 --- a/Source/BreakpointController.m +++ b/Source/BreakpointController.m @@ -94,7 +94,7 @@ /** * The gutter was clicked, which indicates that a breakpoint needs to be changed */ -- (void)gutterClickedAtLine:(int)line forFile:(NSString*)file +- (void)gutterClickedAtLine:(NSUInteger)line forFile:(NSString*)file { if ([manager hasBreakpointAt:line inFile:file]) { -- 2.22.5