diff --git a/atom/browser/ui/cocoa/atom_touch_bar.mm b/atom/browser/ui/cocoa/atom_touch_bar.mm index 277123f3bca7..621de194eafd 100644 --- a/atom/browser/ui/cocoa/atom_touch_bar.mm +++ b/atom/browser/ui/cocoa/atom_touch_bar.mm @@ -44,7 +44,7 @@ static NSTouchBarItemIdentifier SliderIdentifier = @"com.electron.touchbar.slide } - (NSMutableArray*)identifiersFromSettings:(const std::vector&)dicts { - NSMutableArray* identifiers = [[NSMutableArray alloc] init]; + NSMutableArray* identifiers = [NSMutableArray array]; for (const auto& item : dicts) { std::string type; @@ -342,7 +342,7 @@ static NSTouchBarItemIdentifier SliderIdentifier = @"com.electron.touchbar.slide std::vector items; if (!child.Get("ordereredItems", &items)) return nil; - NSMutableArray* generatedItems = [[NSMutableArray alloc] init]; + NSMutableArray* generatedItems = [NSMutableArray array]; NSMutableArray* identList = [self identifiersFromSettings:items]; for (NSUInteger i = 0; i < [identList count]; i++) { if ([identList objectAtIndex:i] != NSTouchBarItemIdentifierOtherItemsProxy) {