Revision: 5930
http://skim-app.svn.sourceforge.net/skim-app/?rev=5930&view=rev
Author: hofman
Date: 2009-10-22 11:58:51 +0000 (Thu, 22 Oct 2009)
Log Message:
-----------
Use INT_MAX instead of UINT_MAX for checking for 32-bit NSNotFound, as that's
what is used. Shouldn't be critical, because NSNotFound should never be written
anyway.
Modified Paths:
--------------
trunk/SkimNotes/PDFDocument_SKNExtensions.m
trunk/SkimNotes/SKNUtilities.m
Modified: trunk/SkimNotes/PDFDocument_SKNExtensions.m
===================================================================
--- trunk/SkimNotes/PDFDocument_SKNExtensions.m 2009-10-22 11:20:20 UTC (rev
5929)
+++ trunk/SkimNotes/PDFDocument_SKNExtensions.m 2009-10-22 11:58:51 UTC (rev
5930)
@@ -79,7 +79,7 @@
while (dict = [e nextObject]) {
NSUInteger pageIndex = [[dict
objectForKey:SKNPDFAnnotationPageIndexKey] unsignedIntValue];
if (annotation = [[PDFAnnotation alloc]
initSkimNoteWithProperties:dict]) {
- if (pageIndex == NSNotFound || pageIndex == UINT_MAX)
+ if (pageIndex == NSNotFound || pageIndex == INT_MAX)
pageIndex = 0;
else if (pageIndex >= [self pageCount])
pageIndex = [self pageCount] - 1;
Modified: trunk/SkimNotes/SKNUtilities.m
===================================================================
--- trunk/SkimNotes/SKNUtilities.m 2009-10-22 11:20:20 UTC (rev 5929)
+++ trunk/SkimNotes/SKNUtilities.m 2009-10-22 11:58:51 UTC (rev 5930)
@@ -55,7 +55,7 @@
NSString *string = [dict objectForKey:NOTE_CONTENTS_KEY];
NSAttributedString *text = [dict objectForKey:NOTE_TEXT_KEY];
- if (pageIndex == NSNotFound || pageIndex == UINT_MAX)
+ if (pageIndex == NSNotFound || pageIndex == INT_MAX)
pageIndex = 0;
[textString appendFormat:@"* %@, page %lu\n\n", type, (long)pageIndex
+ 1];
@@ -82,7 +82,7 @@
NSString *string = [dict objectForKey:NOTE_CONTENTS_KEY];
NSAttributedString *text = [dict objectForKey:NOTE_TEXT_KEY];
- if (pageIndex == NSNotFound || pageIndex == UINT_MAX)
+ if (pageIndex == NSNotFound || pageIndex == INT_MAX)
pageIndex = 0;
[attrString replaceCharactersInRange:NSMakeRange([attrString length],
0) withString:[NSString stringWithFormat:@"* %@, page %lu\n\n", type,
(long)pageIndex + 1]];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit