Don't copy an array we'll copy again 2 lines later.

If the delegate returns nil we're just copying nil, and if it does return an array we only use it for a single read-only `arrayByAddingObjectsFromArray:`.
This commit is contained in:
Alexander Ljungberg committed 2012-06-28 19:15:20 +01:00
1 parent 80d537958e
commit a769618e3e
1 file changed
+1 -1
+1 -1
View File
@@ -316,7 +316,7 @@ var CPToolbarsByIdentifier = nil,
if ([_delegate respondsToSelector:@selector(toolbarDefaultItemIdentifiers:)])
{
var itemIdentifiersFromDelegate = [[_delegate toolbarDefaultItemIdentifiers:self] mutableCopy];
var itemIdentifiersFromDelegate = [_delegate toolbarDefaultItemIdentifiers:self];
// If we get items both from the Cib and from the delegate method, put the delegate items before the
// Cib ones.