[vlc-commits] macosx: minor code optimization

Felix Paul Kühne git at videolan.org
Sun Mar 10 15:06:11 CET 2013


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Mar 10 14:49:07 2013 +0100| [8aa14596ca70951fb6b43e6830fa8163181f3a7e] | committer: Felix Paul Kühne

macosx: minor code optimization

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8aa14596ca70951fb6b43e6830fa8163181f3a7e
---

 modules/gui/macosx/simple_prefs.m |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m
index 421b9fd..d1d2339 100644
--- a/modules/gui/macosx/simple_prefs.m
+++ b/modules/gui/macosx/simple_prefs.m
@@ -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:@""]) { \



More information about the vlc-commits mailing list