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
/// 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.
152
+
/// 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.
153
153
/// - precondition: The range must be within the bounds of the data. Otherwise `fatalError` is called.
154
154
/// - parameter buffer: A buffer to copy the data into.
155
155
/// - 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.
@@ -329,7 +329,7 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl
329
329
330
330
/// Copy the contents of the data into a buffer.
331
331
///
332
-
/// This function copies the bytes in `range` from the data into the buffer. If the count of the `range` is greater than `strideof(DestinationType) * buffer.count` then the first N bytes will be copied into the buffer.
332
+
/// This function copies the bytes in `range` from the data into the buffer. If the count of the `range` is greater than `MemoryLayout<DestinationType>.stride * buffer.count` then the first N bytes will be copied into the buffer.
333
333
/// - precondition: The range must be within the bounds of the data. Otherwise `fatalError` is called.
334
334
/// - parameter buffer: A buffer to copy the data into.
335
335
/// - 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.
@@ -347,9 +347,9 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl
347
347
precondition(r.upperBound >=0)
348
348
precondition(r.upperBound <= cnt,"The range is outside the bounds of the data")
0 commit comments