From 49fdc602ba6e36e97fb0552a71ea2c9b9ce2a7b6 Mon Sep 17 00:00:00 2001 From: Fred Kiefer Date: Wed, 3 Nov 2010 20:26:30 +0000 Subject: [PATCH] Remove a few compiler warnings. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31587 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 10 ++++++++++ Headers/Additions/GNUstepGUI/GSTheme.h | 1 + Headers/AppKit/NSLayoutManager.h | 6 +++--- Source/NSLayoutManager.m | 17 ++++++++--------- Source/NSTextView.m | 2 +- 5 files changed, 23 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 88ce1fb1b..5c38d4c18 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2010-11-03 Fred Kiefer + + * Headers/Additions/GNUstepGUI/GSTheme.h: Add method + doesProcessEventsForPopUpMenu to avoid compiler warnings. + * Headers/AppKit/NSLayoutManager.h, + * Source/NSLayoutManager.m: Change a few "unsigned int" into + NSUInteger to avoid compiler warnings. + * Source/NSTextView.m (firstRectForCharacterRange:): Adopt to + these changes. + 2010-11-03 Fred Kiefer * Source/NSWindow.m (-validRequestorForSendType:returnType:): diff --git a/Headers/Additions/GNUstepGUI/GSTheme.h b/Headers/Additions/GNUstepGUI/GSTheme.h index 8a6c16568..c6d6bc977 100644 --- a/Headers/Additions/GNUstepGUI/GSTheme.h +++ b/Headers/Additions/GNUstepGUI/GSTheme.h @@ -1069,6 +1069,7 @@ withRepeatedImage: (NSImage*)image controlViewWindow: (NSWindow *)cvWin preferredEdge: (NSRectEdge)edge selectedItem: (int)selectedItem; +- (BOOL) doesProcessEventsForPopUpMenu; /** * Processes menu events for the theme. The default implementation diff --git a/Headers/AppKit/NSLayoutManager.h b/Headers/AppKit/NSLayoutManager.h index 971ad0415..e5fa87055 100644 --- a/Headers/AppKit/NSLayoutManager.h +++ b/Headers/AppKit/NSLayoutManager.h @@ -97,17 +97,17 @@ typedef enum { - (void) textContainerChangedTextView: (NSTextContainer *)aContainer; -- (NSPoint) locationForGlyphAtIndex: (unsigned int)glyphIndex; +- (NSPoint) locationForGlyphAtIndex: (NSUInteger)glyphIndex; - (NSRect *) rectArrayForGlyphRange: (NSRange)glyphRange withinSelectedGlyphRange: (NSRange)selGlyphRange inTextContainer: (NSTextContainer *)container - rectCount: (unsigned int *)rectCount; + rectCount: (NSUInteger *)rectCount; - (NSRect *) rectArrayForCharacterRange: (NSRange)charRange withinSelectedCharacterRange: (NSRange)selCharRange inTextContainer: (NSTextContainer *)container - rectCount: (unsigned int *)rectCount; + rectCount: (NSUInteger *)rectCount; - (NSRect) boundingRectForGlyphRange: (NSRange)glyphRange inTextContainer: (NSTextContainer *)aTextContainer; diff --git a/Source/NSLayoutManager.m b/Source/NSLayoutManager.m index 0ceee6be6..b497f023c 100644 --- a/Source/NSLayoutManager.m +++ b/Source/NSLayoutManager.m @@ -157,12 +157,12 @@ first. Remaining cases, highest priority first: @implementation NSLayoutManager (layout) --(NSPoint) locationForGlyphAtIndex: (unsigned int)glyphIndex +-(NSPoint) locationForGlyphAtIndex: (NSUInteger)glyphIndex { NSRange r; NSPoint p; NSFont *f; - unsigned int i; + NSUInteger i; r = [self rangeOfNominallySpacedGlyphsContainingIndex: glyphIndex startLocation: &p]; @@ -213,9 +213,9 @@ container? necessary? */ -(NSRect *) rectArrayForGlyphRange: (NSRange)glyphRange withinSelectedGlyphRange: (NSRange)selGlyphRange inTextContainer: (NSTextContainer *)container - rectCount: (unsigned int *)rectCount + rectCount: (NSUInteger *)rectCount { - unsigned int last; + NSUInteger last; int i; textcontainer_t *tc; linefrag_t *lf; @@ -223,7 +223,6 @@ container? necessary? */ float x0, x1; NSRect r; - *rectCount = 0; for (tc = textcontainers, i = 0; i < num_textcontainers; i++, tc++) @@ -320,7 +319,7 @@ container? necessary? */ The end index is inside the line frag, so we need to find the exact end location. */ - unsigned int i; + NSUInteger i; int j; linefrag_point_t *lp; glyph_run_t *r; @@ -400,7 +399,7 @@ container? necessary? */ -(NSRect *) rectArrayForCharacterRange: (NSRange)charRange withinSelectedCharacterRange: (NSRange)selCharRange inTextContainer: (NSTextContainer *)container - rectCount: (unsigned int *)rectCount + rectCount: (NSUInteger *)rectCount { NSRange r1, r2; @@ -422,7 +421,7 @@ container? necessary? */ { NSRect *r; NSRect result; - unsigned int i, c; + NSUInteger i, c; /* TODO: This isn't correct. Need to handle glyphs that extend outside the line frag rect. */ @@ -1161,7 +1160,7 @@ container unsigned int glyph_pos, char_pos, first_char_pos; int i, j; NSRect *rects; - unsigned int count; + NSUInteger count; NSColor *color, *last_color; NSGraphicsContext *ctxt = GSCurrentContext(); diff --git a/Source/NSTextView.m b/Source/NSTextView.m index 3a533b01c..a93c12b13 100644 --- a/Source/NSTextView.m +++ b/Source/NSTextView.m @@ -1997,7 +1997,7 @@ here. */ - (NSRect) firstRectForCharacterRange: (NSRange)theRange { - unsigned int rectCount = 0; + NSUInteger rectCount = 0; NSRect *rects; if (!_layoutManager)