Revision: 15029
          http://sourceforge.net/p/skim-app/code/15029
Author:   hofman
Date:     2025-03-27 10:23:44 +0000 (Thu, 27 Mar 2025)
Log Message:
-----------
enumerate using block

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

Modified: trunk/SKColorSwatch.m
===================================================================
--- trunk/SKColorSwatch.m       2025-03-27 10:07:11 UTC (rev 15028)
+++ trunk/SKColorSwatch.m       2025-03-27 10:23:44 UTC (rev 15029)
@@ -586,12 +586,11 @@
 }
 
 - (void)animateItemViewsCollapsing:(NSInteger)collapsedIndex {
-    NSUInteger i = 0;
-    for (SKColorSwatchItemView *itemView in itemViews) {
-        NSRect frame = [self frameForItemViewAtIndex:i++ 
collapsedIndex:collapsedIndex];
+    [itemViews enumerateObjectsUsingBlock:^(SKColorSwatchItemView *itemView, 
NSUInteger i, BOOL *stop){
+        NSRect frame = [self frameForItemViewAtIndex:i 
collapsedIndex:collapsedIndex];
         if (NSEqualRects(frame, [itemView frame]) == NO)
             [[itemView animator] setFrame:frame];
-    }
+    }];
 }
 
 - (void)insertColor:(NSColor *)color atIndex:(NSInteger)i {

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