Skip to content

Commit

Permalink
NSArray: Remove unnecessary 'cnt' parameter name.
Browse files Browse the repository at this point in the history
  • Loading branch information
spevans committed Oct 13, 2017
1 parent 445fea5 commit c7bc4ca
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions Foundation/NSArray.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@ open class NSArray : NSObject, NSCopying, NSMutableCopying, NSSecureCoding, NSCo
_storage.reserveCapacity(0)
}

public required init(objects: UnsafePointer<AnyObject>?, count cnt: Int) {
precondition(cnt >= 0)
precondition(cnt == 0 || objects != nil)
public required init(objects: UnsafePointer<AnyObject>?, count: Int) {
precondition(count >= 0)
precondition(count == 0 || objects != nil)

_storage.reserveCapacity(cnt)
for idx in 0..<cnt {
_storage.reserveCapacity(count)
for idx in 0..<count {
_storage.append(objects![idx])
}
}

public convenience init(objects: UnsafePointer<AnyObject>, count cnt: Int) {
public convenience init(objects: UnsafePointer<AnyObject>, count: Int) {
self.init()
_storage.reserveCapacity(cnt)
for idx in 0..<cnt {
_storage.reserveCapacity(count)
for idx in 0..<count {
_storage.append(objects[idx])
}
}
Expand Down Expand Up @@ -754,13 +754,13 @@ open class NSMutableArray : NSArray {
}
}

public required init(objects: UnsafePointer<AnyObject>?, count cnt: Int) {
precondition(cnt >= 0)
precondition(cnt == 0 || objects != nil)
public required init(objects: UnsafePointer<AnyObject>?, count: Int) {
precondition(count >= 0)
precondition(count == 0 || objects != nil)

super.init()
_storage.reserveCapacity(cnt)
for idx in 0..<cnt {
_storage.reserveCapacity(count)
for idx in 0..<count {
_storage.append(objects![idx])
}
}
Expand Down

0 comments on commit c7bc4ca

Please sign in to comment.