mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-11 11:07:07 +00:00
Better -copy implementations for KVC arrays and sets.
Reviewed by me.
This commit is contained in:
1 parent
028a4fe5b2
commit
5af66b60e1
3 files changed
+7
-13
No files matched your search
@@ -35,12 +35,12 @@ var indexOf = Array.prototype.indexOf,
|
||||
|
||||
- (id)initWithArray:(CPArray)anArray
|
||||
{
|
||||
return slice.call(anArray, 0);
|
||||
return [self initWithArray:anArray copyItems:NO];
|
||||
}
|
||||
|
||||
- (id)initWithArray:(CPArray)anArray copyItems:(BOOL)shouldCopyItems
|
||||
{
|
||||
if (!shouldCopyItems)
|
||||
if (!shouldCopyItems && anArray.isa === _CPJavaScriptArray)
|
||||
return slice.call(anArray, 0);
|
||||
|
||||
self = [super init];
|
||||
|
||||
Reference in new issue
Block a user