Commit 8aa14596 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: minor code optimization

parent 08996f73
...@@ -1193,12 +1193,14 @@ static inline void save_module_list(intf_thread_t * p_intf, id object, const cha ...@@ -1193,12 +1193,14 @@ static inline void save_module_list(intf_thread_t * p_intf, id object, const cha
NSString *handler; NSString *handler;
NSString *rawhandler; NSString *rawhandler;
NSMutableArray *rawHandlers; NSMutableArray *rawHandlers;
NSUInteger count;
#define fillUrlHandlerPopup( protocol, object ) \ #define fillUrlHandlerPopup( protocol, object ) \
handlers = (NSArray *)LSCopyAllHandlersForURLScheme(CFSTR( protocol )); \ handlers = (NSArray *)LSCopyAllHandlersForURLScheme(CFSTR( protocol )); \
rawHandlers = [[NSMutableArray alloc] init]; \ rawHandlers = [[NSMutableArray alloc] init]; \
[object removeAllItems]; \ [object removeAllItems]; \
for (NSUInteger x = 0; x < [handlers count]; x++) { \ count = [handlers count]; \
for (NSUInteger x = 0; x < count; x++) { \
rawhandler = [handlers objectAtIndex:x]; \ rawhandler = [handlers objectAtIndex:x]; \
handler = [self applicationNameForBundleIdentifier:rawhandler]; \ handler = [self applicationNameForBundleIdentifier:rawhandler]; \
if (handler && ![handler isEqualToString:@""]) { \ if (handler && ![handler isEqualToString:@""]) { \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment