[vlc-devel] [vlc-commits] macosx: dynamically create context and main sub menu for playlist table header selection , Simplifications in existing code

Felix Kühne fkuehne.videolan at gmail.com
Sun Aug 19 19:59:01 CEST 2012


On Sun, Aug 19, 2012 at 6:09 PM, David Fuhrmann <git at videolan.org> wrote:
> vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sun Aug 19 16:41:49 2012 +0200| [f956a68eb889593c3aa194004dbe984f5633145c] | committer: David Fuhrmann
>
> macosx: dynamically create context and main sub menu for playlist table header selection, Simplifications in existing code
>

> +    NSMenuItem *o_mi_tmp;
> +    for( NSUInteger i = 0; i < [o_ptc_menuorder count]; i++ )
> +    {
> +        NSString *o_title = [o_ptc_translation_dict objectForKey:[o_ptc_menuorder objectAtIndex:i]];

Please consider to cache the array count in an NSUInteger to save 9
Obj-C selector calls. This will speed-up things a lot (while probably
not too noticeable in this context).

Best regards,

Felix



More information about the vlc-devel mailing list