Revision: 12153
          http://sourceforge.net/p/skim-app/code/12153
Author:   hofman
Date:     2021-03-01 15:52:33 +0000 (Mon, 01 Mar 2021)
Log Message:
-----------
No need for variable for a constant

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

Modified: trunk/SKColorSwatch.m
===================================================================
--- trunk/SKColorSwatch.m       2021-03-01 15:45:25 UTC (rev 12152)
+++ trunk/SKColorSwatch.m       2021-03-01 15:52:33 UTC (rev 12153)
@@ -232,13 +232,12 @@
 
 - (NSInteger)colorIndexAtPoint:(NSPoint)point {
     NSRect rect = [self frameForColorAtIndex:0];
-    CGFloat distance = COLOR_DISTANCE;
     NSInteger i, count = [colors count];
     
     for (i = 0; i < count; i++) {
         if (NSMouseInRect(point, rect, [self isFlipped]))
             return i;
-        rect.origin.x += distance;
+        rect.origin.x += COLOR_DISTANCE;
     }
     return -1;
 }
@@ -245,7 +244,6 @@
 
 - (NSInteger)insertionIndexAtPoint:(NSPoint)point {
     NSRect rect = [self frameForColorAtIndex:0];
-    CGFloat w = COLOR_DISTANCE;
     CGFloat x = NSMidX(rect);
     NSInteger i, count = [colors count];
     
@@ -252,7 +250,7 @@
     for (i = 0; i < count; i++) {
         if (point.x < x)
             return i;
-        x += w;
+        x += COLOR_DISTANCE;
     }
     return count;
 }

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

Reply via email to