Revision: 16548
http://sourceforge.net/p/skim-app/code/16548
Author: hofman
Date: 2026-09-27 14:24:32 +0000 (Sun, 27 Sep 2026)
Log Message:
-----------
return directly from loop when matching
Modified Paths:
--------------
trunk/PDFAnnotation_SKExtensions.m
Modified: trunk/PDFAnnotation_SKExtensions.m
===================================================================
--- trunk/PDFAnnotation_SKExtensions.m 2026-09-27 14:19:28 UTC (rev 16547)
+++ trunk/PDFAnnotation_SKExtensions.m 2026-09-27 14:24:32 UTC (rev 16548)
@@ -857,10 +857,11 @@
} else if ([type isEqualToString:SKNHighlightString] || [type
isEqualToString:SKNUnderlineString] || [type
isEqualToString:SKNStrikeOutString]) {
NSPointerArray *lines = [self lineRects];
NSUInteger i = [lines count];
- BOOL isContained = NO;
- while (i-- && NO == isContained)
- isContained = NSPointInRect(point, [lines rectAtIndex:i]);
- return isContained;
+ while (i--) {
+ if (NSPointInRect(point, [lines rectAtIndex:i]))
+ return YES;
+ }
+ return NO;
}
return YES;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit