Browse Source

macosx: Do not double-create array in toolbar delegate

Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
pull/201/head
Claudio Cambra 4 months ago
committed by Felix Paul Kühne
parent
commit
f62ebfa4fb
  1. 3
      modules/gui/macosx/library/VLCLibraryWindowToolbarDelegate.m

3
modules/gui/macosx/library/VLCLibraryWindowToolbarDelegate.m

@ -246,8 +246,7 @@ NSString * const VLCLibraryWindowTrackingSeparatorToolbarItemIdentifier =
}
// Display as far to the right as possible, but not in front of the multifunc bar toggle button
NSMutableArray<NSToolbarItem *> * const currentToolbarItems =
[NSMutableArray arrayWithArray:self.toolbar.items];
NSMutableArray<NSToolbarItem *> * const currentToolbarItems = self.toolbar.items.mutableCopy;
if (currentToolbarItems.lastObject == self.togglePlayQueueToolbarItem) {
[currentToolbarItems removeLastObject];
}

Loading…
Cancel
Save