You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
privatefunc _copyBytesHelper(to pointer:UnsafeMutablePointer<UInt8>, from range:CountableRange<Index>){
@@ -151,7 +151,7 @@ public struct DispatchData : RandomAccessCollection {
151
151
152
152
/// Copy the contents of the data into a buffer.
153
153
///
154
-
/// This function copies the bytes in `range` from the data into the buffer. If the count of the `range` is greater than `MemoryLayout<DestinationType>.size * buffer.count` then the first N bytes will be copied into the buffer.
154
+
/// This function copies the bytes in `range` from the data into the buffer. If the count of the `range` is greater than `sizeof(DestinationType) * buffer.count` then the first N bytes will be copied into the buffer.
155
155
/// - precondition: The range must be within the bounds of the data. Otherwise `fatalError` is called.
156
156
/// - parameter buffer: A buffer to copy the data into.
157
157
/// - parameter range: A range in the data to copy into the buffer. If the range is empty, this function will return 0 without copying anything. If the range is nil, as much data as will fit into `buffer` is copied.
@@ -169,9 +169,9 @@ public struct DispatchData : RandomAccessCollection {
169
169
precondition(r.endIndex >=0)
170
170
precondition(r.endIndex <= cnt,"The range is outside the bounds of the data")
0 commit comments