Revision: 15039
          http://sourceforge.net/p/skim-app/code/15039
Author:   hofman
Date:     2025-03-28 17:20:17 +0000 (Fri, 28 Mar 2025)
Log Message:
-----------
enumerate with block

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

Modified: trunk/SKColorSwatch.m
===================================================================
--- trunk/SKColorSwatch.m       2025-03-28 16:55:52 UTC (rev 15038)
+++ trunk/SKColorSwatch.m       2025-03-28 17:20:17 UTC (rev 15039)
@@ -724,15 +724,14 @@
 #pragma mark NSDraggingDestination protocol 
 
 - (void)setDropLocation:(SKColorSwatchDropLocation)dropLocation 
atIndex:(NSInteger)anIndex {
-    NSInteger i, iMax = [itemViews count];
-    for (i = 0; i < iMax; i++) {
+    [itemViews enumerateObjectsUsingBlock:^(SKColorSwatchItemView *itemView,  
NSUInteger i, BOOL *stop){
         SKColorSwatchDropLocation location = SKColorSwatchNoDrop;
-        if (i == anIndex)
+        if ((NSInteger)i == anIndex)
             location = dropLocation;
-        else if (dropLocation == SKColorSwatchDropBefore && i + 1 == anIndex)
+        else if (dropLocation == SKColorSwatchDropBefore && (NSInteger)i + 1 
== anIndex)
             location = SKColorSwatchDropAfter;
         [[itemViews objectAtIndex:i] setDropLocation:location];
-    }
+    }];
 }
 
 - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender {

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