mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
implement SE 184: add allocation methods to Unsafe buffer pointers, drop all parameters from deallocation, adjust namings, and add repeated-value assignment methods
This commit is contained in:
committed by
Andrew Trick
parent
c7d33e70d3
commit
c85880899d
@@ -87,7 +87,7 @@ UnsafeBitMapTests.test("initializeToZero()")
|
||||
.forEach(in: sizes) {
|
||||
sizeInBits in
|
||||
let bitMap = make(sizeInBits: sizeInBits)
|
||||
defer { bitMap.values.deallocate(capacity: bitMap.numberOfWords) }
|
||||
defer { bitMap.values.deallocate() }
|
||||
|
||||
bitMap.initializeToZero()
|
||||
for i in 0..<sizeInBits {
|
||||
@@ -99,7 +99,7 @@ UnsafeBitMapTests.test("subscript")
|
||||
.forEach(in: sizes) {
|
||||
sizeInBits in
|
||||
let bitMap = make(sizeInBits: sizeInBits)
|
||||
defer { bitMap.values.deallocate(capacity: bitMap.numberOfWords) }
|
||||
defer { bitMap.values.deallocate() }
|
||||
|
||||
if sizeInBits != 0 {
|
||||
bitMap.initializeToZero()
|
||||
@@ -122,4 +122,3 @@ UnsafeBitMapTests.test("subscript")
|
||||
}
|
||||
|
||||
runAllTests()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user