Revision: 12409
          http://sourceforge.net/p/skim-app/code/12409
Author:   hofman
Date:     2021-09-17 21:47:49 +0000 (Fri, 17 Sep 2021)
Log Message:
-----------
Type unsigned integer to signed integer when substracting to avoid overloading

Modified Paths:
--------------
    trunk/SKColorSwatch.m

Modified: trunk/SKColorSwatch.m
===================================================================
--- trunk/SKColorSwatch.m       2021-09-17 21:02:04 UTC (rev 12408)
+++ trunk/SKColorSwatch.m       2021-09-17 21:47:49 UTC (rev 12409)
@@ -213,7 +213,7 @@
 }
 
 - (NSSize)contentSizeForNumberOfColors:(NSUInteger)count {
-    return NSMakeSize(bezelHeight + (count - 1) * [self 
distanceBetweenColors], bezelHeight);
+    return NSMakeSize(bezelHeight + ((NSInteger)count - 1) * [self 
distanceBetweenColors], bezelHeight);
 }
 
 - (NSRect)frameForColorAtIndex:(NSInteger)anIndex {
@@ -444,7 +444,7 @@
 
 - (void)moveLeft:(id)sender {
     if (--focusedIndex < 0)
-        focusedIndex = [colors count] - 1;
+        focusedIndex = (NSInteger)[colors count] - 1;
     [self noteFocusRingMaskChanged];
     NSAccessibilityPostNotification(self, 
NSAccessibilityFocusedUIElementChangedNotification);
 }
@@ -635,7 +635,7 @@
 - (void)removeColorAtIndex:(NSInteger)i {
     if (i >= 0 && i < (NSInteger)[colors count] && [colors count] > 1) {
         [self deactivate];
-        NSSize size = [self sizeForNumberOfColors:[colors count] - 1];
+        NSSize size = [self sizeForNumberOfColors:(NSInteger)[colors count] - 
1];
         [self noteFocusRingMaskChanged];
         [NSAnimationContext runAnimationGroup:^(NSAnimationContext *context){
                 [self animateItemViewsCollapsing:i frameSize:size];

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to