Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stdlib/public/core/UnsafeBufferPointer.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,9 @@ extension Unsafe${Mutable}BufferPointer {
public init(
@_nonEphemeral start: Unsafe${Mutable}Pointer<Element>?, count: Int
) {
_precondition(
_debugPrecondition(
count >= 0, "Unsafe${Mutable}BufferPointer with negative count")
_precondition(
_debugPrecondition(
count == 0 || start != nil,
"Unsafe${Mutable}BufferPointer has a nil start and nonzero count")
_position = start
Expand Down
4 changes: 2 additions & 2 deletions stdlib/public/core/UnsafeRawBufferPointer.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@ extension Unsafe${Mutable}RawBufferPointer {
public init(
@_nonEphemeral start: Unsafe${Mutable}RawPointer?, count: Int
) {
_precondition(count >= 0, "${Self} with negative count")
_precondition(count == 0 || start != nil,
_debugPrecondition(count >= 0, "${Self} with negative count")
_debugPrecondition(count == 0 || start != nil,
"${Self} has a nil start and nonzero count")
_position = start
_end = start.map { $0 + count }
Expand Down