diff --git a/atom/browser/ui/cocoa/atom_scrubber_data_source.h b/atom/browser/ui/cocoa/atom_scrubber_data_source.h index 5850e307698a..57ef1509096a 100644 --- a/atom/browser/ui/cocoa/atom_scrubber_data_source.h +++ b/atom/browser/ui/cocoa/atom_scrubber_data_source.h @@ -18,8 +18,8 @@ std::vector items_; } -- (id)initWithItems:(std::vector)items; -- (void)setItems:(std::vector)items; +- (id)initWithItems:(const std::vector&)items; +- (void)setItems:(const std::vector&)items; @end diff --git a/atom/browser/ui/cocoa/atom_scrubber_data_source.mm b/atom/browser/ui/cocoa/atom_scrubber_data_source.mm index b320d7a2c3f2..3c8bb6b932b4 100644 --- a/atom/browser/ui/cocoa/atom_scrubber_data_source.mm +++ b/atom/browser/ui/cocoa/atom_scrubber_data_source.mm @@ -13,18 +13,19 @@ static NSString* const TextItemIdentifier = @"scrubber.text.item"; static NSString* const ImageItemIdentifier = @"scrubber.image.item"; -- (id)initWithItems:(std::vector)items { +- (id)initWithItems:(const std::vector&)items { if ((self = [super init])) { items_ = items; } return self; } -- (NSInteger)numberOfItemsForScrubber:(NSScrubber *)theScrubber { +- (NSInteger)numberOfItemsForScrubber:(NSScrubber*)theScrubber { return items_.size(); } -- (NSScrubberItemView *)scrubber:(NSScrubber *)scrubber viewForItemAtIndex:(NSInteger)index { +- (NSScrubberItemView*)scrubber:(NSScrubber*)scrubber + viewForItemAtIndex:(NSInteger)index { mate::PersistentDictionary item = items_[index]; NSScrubberItemView* itemView; @@ -48,7 +49,7 @@ static NSString* const ImageItemIdentifier = @"scrubber.image.item"; return itemView; } -- (void)setItems:(std::vector)items { +- (void)setItems:(const std::vector&)items { items_ = items; }