mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary
This commit is contained in:
@@ -55,7 +55,7 @@ var unicodeScalarCount: Int {
|
||||
return count
|
||||
}
|
||||
|
||||
func nthUnicodeScalar(n: UInt32) -> UnicodeScalar {
|
||||
func nthUnicodeScalar(_ n: UInt32) -> UnicodeScalar {
|
||||
var count: UInt32 = 0
|
||||
for r in unicodeScalarRanges {
|
||||
count += r.endIndex - r.startIndex
|
||||
@@ -68,7 +68,7 @@ func nthUnicodeScalar(n: UInt32) -> UnicodeScalar {
|
||||
|
||||
// `buffer` should have a length >= 4
|
||||
func nsEncode<CodeUnit>(
|
||||
c: UInt32,
|
||||
_ c: UInt32,
|
||||
_ encoding: NSStringEncoding,
|
||||
_ buffer: inout [CodeUnit],
|
||||
_ used: inout Int
|
||||
@@ -97,7 +97,7 @@ class CodecTest<Codec : TestableUnicodeCodec> {
|
||||
var nsEncodeBuffer: [CodeUnit] = Array(repeating: 0, count: 4)
|
||||
var encodeBuffer: [CodeUnit] = Array(repeating: 0, count: 4)
|
||||
|
||||
func testOne(scalar: UnicodeScalar) {
|
||||
func testOne(_ scalar: UnicodeScalar) {
|
||||
/* Progress reporter
|
||||
if (scalar.value % 0x1000) == 0 {
|
||||
print("\(asHex(scalar.value))")
|
||||
@@ -137,7 +137,7 @@ class CodecTest<Codec : TestableUnicodeCodec> {
|
||||
)
|
||||
}
|
||||
|
||||
func run(minScalarOrd: Int, _ maxScalarOrd: Int) {
|
||||
func run(_ minScalarOrd: Int, _ maxScalarOrd: Int) {
|
||||
print("testing \(Codec.name())")
|
||||
for i in minScalarOrd..<maxScalarOrd {
|
||||
testOne(nthUnicodeScalar(UInt32(i)))
|
||||
|
||||
Reference in New Issue
Block a user