Skip to content

Commit c7bc4ca

Browse files
committed
NSArray: Remove unnecessary 'cnt' parameter name.
1 parent 445fea5 commit c7bc4ca

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

Foundation/NSArray.swift

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,20 @@ open class NSArray : NSObject, NSCopying, NSMutableCopying, NSSecureCoding, NSCo
3131
_storage.reserveCapacity(0)
3232
}
3333

34-
public required init(objects: UnsafePointer<AnyObject>?, count cnt: Int) {
35-
precondition(cnt >= 0)
36-
precondition(cnt == 0 || objects != nil)
34+
public required init(objects: UnsafePointer<AnyObject>?, count: Int) {
35+
precondition(count >= 0)
36+
precondition(count == 0 || objects != nil)
3737

38-
_storage.reserveCapacity(cnt)
39-
for idx in 0..<cnt {
38+
_storage.reserveCapacity(count)
39+
for idx in 0..<count {
4040
_storage.append(objects![idx])
4141
}
4242
}
4343

44-
public convenience init(objects: UnsafePointer<AnyObject>, count cnt: Int) {
44+
public convenience init(objects: UnsafePointer<AnyObject>, count: Int) {
4545
self.init()
46-
_storage.reserveCapacity(cnt)
47-
for idx in 0..<cnt {
46+
_storage.reserveCapacity(count)
47+
for idx in 0..<count {
4848
_storage.append(objects[idx])
4949
}
5050
}
@@ -754,13 +754,13 @@ open class NSMutableArray : NSArray {
754754
}
755755
}
756756

757-
public required init(objects: UnsafePointer<AnyObject>?, count cnt: Int) {
758-
precondition(cnt >= 0)
759-
precondition(cnt == 0 || objects != nil)
757+
public required init(objects: UnsafePointer<AnyObject>?, count: Int) {
758+
precondition(count >= 0)
759+
precondition(count == 0 || objects != nil)
760760

761761
super.init()
762-
_storage.reserveCapacity(cnt)
763-
for idx in 0..<cnt {
762+
_storage.reserveCapacity(count)
763+
for idx in 0..<count {
764764
_storage.append(objects![idx])
765765
}
766766
}

0 commit comments

Comments
 (0)