File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1018,7 +1018,7 @@ extension Unsafe${Mutable}BufferPointer {
1018
1018
@inlinable
1019
1019
@_alwaysEmitIntoClient
1020
1020
public func initializeElement( at index: Index, to value: Element) {
1021
- precondition ( startIndex <= index && index < endIndex)
1021
+ _debugPrecondition ( startIndex <= index && index < endIndex)
1022
1022
let p = baseAddress. _unsafelyUnwrappedUnchecked. advanced ( by: index)
1023
1023
p. initialize ( to: value)
1024
1024
}
@@ -1036,7 +1036,7 @@ extension Unsafe${Mutable}BufferPointer {
1036
1036
@inlinable
1037
1037
@_alwaysEmitIntoClient
1038
1038
public func moveElement( from index: Index) - > Element {
1039
- precondition ( startIndex <= index && index < endIndex)
1039
+ _debugPrecondition ( startIndex <= index && index < endIndex)
1040
1040
return baseAddress. _unsafelyUnwrappedUnchecked. advanced ( by: index) . move ( )
1041
1041
}
1042
1042
@@ -1051,7 +1051,7 @@ extension Unsafe${Mutable}BufferPointer {
1051
1051
@inlinable
1052
1052
@_alwaysEmitIntoClient
1053
1053
public func deinitializeElement( at index: Index) {
1054
- precondition ( startIndex <= index && index < endIndex)
1054
+ _debugPrecondition ( startIndex <= index && index < endIndex)
1055
1055
let p = baseAddress. _unsafelyUnwrappedUnchecked. advanced ( by: index)
1056
1056
p. deinitialize ( count: 1 )
1057
1057
}
Original file line number Diff line number Diff line change @@ -1118,7 +1118,7 @@ extension Slice {
1118
1118
var slice = UnsafeMutableBufferPointer ( start: start, count: count)
1119
1119
let ( b, c) = ( slice. baseAddress, slice. count)
1120
1120
defer {
1121
- precondition (
1121
+ _precondition (
1122
1122
slice. baseAddress == b && slice. count == c,
1123
1123
" Slice.withContiguousMutableStorageIfAvailable: " +
1124
1124
" replacing the buffer is not allowed " )
You can’t perform that action at this time.
0 commit comments