@@ -636,7 +636,8 @@ extension Unsafe${Mutable}BufferPointer {
636
636
return UnsafeMutableBufferPointer ( start: base, count: count)
637
637
}
638
638
639
- /// Initializes every element in this buffer's memory to a copy of the given value.
639
+ /// Initializes every element in this buffer's memory to
640
+ /// a copy of the given value.
640
641
///
641
642
/// The destination memory must be uninitialized or the buffer's `Element`
642
643
/// must be a trivial type. After a call to `initialize(repeating:)`, the
@@ -682,7 +683,8 @@ extension Unsafe${Mutable}BufferPointer {
682
683
return source. _copyContents ( initializing: self )
683
684
}
684
685
685
- /// Initializes the buffer's memory with every element of the source.
686
+ /// Initializes the buffer's memory with
687
+ /// every element of the source.
686
688
///
687
689
/// Prior to calling the `initialize(fromContentsOf:)` method on a buffer,
688
690
/// the memory referenced by the buffer must be uninitialized,
@@ -701,8 +703,9 @@ extension Unsafe${Mutable}BufferPointer {
701
703
/// - Precondition: `self.count` >= `source.count`
702
704
///
703
705
/// - Parameter source: A collection of elements to be used to
704
- /// initialize the buffer's storage.
705
- /// - Returns: An index to the next uninitialized element in the buffer.
706
+ /// initialize the buffer's storage.
707
+ /// - Returns: The index one past the last element of the buffer initialized
708
+ /// by this function.
706
709
@inlinable
707
710
@_alwaysEmitIntoClient
708
711
public func initialize(
@@ -784,7 +787,8 @@ extension Unsafe${Mutable}BufferPointer {
784
787
return ( iterator, index)
785
788
}
786
789
787
- /// Updates the buffer's initialized memory with every element of the source.
790
+ /// Updates the buffer's initialized memory with
791
+ /// every element of the source.
788
792
///
789
793
/// Prior to calling the `update(fromContentsOf:)` method on a buffer,
790
794
/// the first `source.count` elements of the buffer's memory must be
@@ -869,8 +873,8 @@ extension Unsafe${Mutable}BufferPointer {
869
873
/// - Parameter source: A buffer containing the values to copy. The memory
870
874
/// region underlying `source` must be initialized. The memory regions
871
875
/// referenced by `source` and this buffer may overlap.
872
- /// - Returns: An index to the next uninitialized element in the buffer,
873
- /// or `endIndex` .
876
+ /// - Returns: The index one past the last element of the buffer initialized
877
+ /// by this function .
874
878
@inlinable
875
879
@_alwaysEmitIntoClient
876
880
public func moveInitialize( fromContentsOf source: Self) - > Index {
@@ -909,8 +913,8 @@ extension Unsafe${Mutable}BufferPointer {
909
913
/// - Parameter source: A buffer containing the values to copy. The memory
910
914
/// region underlying `source` must be initialized. The memory regions
911
915
/// referenced by `source` and this buffer may overlap.
912
- /// - Returns: An index to the next uninitialized element in the buffer,
913
- /// or `endIndex` .
916
+ /// - Returns: The index one past the last element of the buffer initialized
917
+ /// by this function .
914
918
@inlinable
915
919
@_alwaysEmitIntoClient
916
920
public func moveInitialize( fromContentsOf source: Slice < Self > ) -> Index {
@@ -1091,7 +1095,7 @@ extension Unsafe${Mutable}BufferPointer {
1091
1095
/// or a whole fraction of `Element`'s stride.
1092
1096
/// To bind a region of memory to a type that does not match these
1093
1097
/// requirements, convert the buffer to a raw buffer and use the
1094
- /// `bindMemory (to:)` method.
1098
+ /// raw buffer's `withMemoryRebound (to:)` method.
1095
1099
/// If `T` and `Element` have different alignments, this buffer's
1096
1100
/// `baseAddress` must be aligned with the larger of the two alignments.
1097
1101
///
0 commit comments