]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/simple_prefs.m
macosx: minor code optimization
[vlc] / modules / gui / macosx / simple_prefs.m
index 421b9fdfa93e5c9d5f7e247613adfd3fb87dd005..d1d2339f9580f19d594fc8eb1b4040c3f299eb29 100644 (file)
@@ -1193,12 +1193,14 @@ static inline void save_module_list(intf_thread_t * p_intf, id object, const cha
         NSString *handler;
         NSString *rawhandler;
         NSMutableArray *rawHandlers;
+        NSUInteger count;
 
 #define fillUrlHandlerPopup( protocol, object ) \
         handlers = (NSArray *)LSCopyAllHandlersForURLScheme(CFSTR( protocol )); \
         rawHandlers = [[NSMutableArray alloc] init]; \
         [object removeAllItems]; \
-        for (NSUInteger x = 0; x < [handlers count]; x++) { \
+        count = [handlers count]; \
+        for (NSUInteger x = 0; x < count; x++) { \
             rawhandler = [handlers objectAtIndex:x]; \
             handler = [self applicationNameForBundleIdentifier:rawhandler]; \
             if (handler && ![handler isEqualToString:@""]) { \