Skip to content

Commit f786137

Browse files
committed
stdlib: Dictionary: use the two-argument version of UnsafeMutablePointer.initialize() instead of a loop
1 parent f7d110d commit f786137

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

stdlib/public/core/HashedCollections.swift.gyb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2486,9 +2486,7 @@ internal struct _BitMap {
24862486
}
24872487

24882488
internal func initializeToZero() {
2489-
for i in 0 ..< numberOfWords {
2490-
(values + i).initialize(with: 0)
2491-
}
2489+
values.initialize(with: 0, count: numberOfWords)
24922490
}
24932491

24942492
internal subscript(i: Int) -> Bool {

0 commit comments

Comments
 (0)