mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[stdlib] indexing model: rename next/previous
I'm not too satisfied with the names for the updating: versions, but this is a start.
This commit is contained in:
@@ -166,12 +166,12 @@ extension _ArrayBufferProtocol where Index == Int {
|
||||
var i = newValues.startIndex
|
||||
for j in RangeOfStrideable(subRange) {
|
||||
elements[j] = newValues[i]
|
||||
newValues._nextInPlace(&i)
|
||||
newValues.successor(updating: &i)
|
||||
}
|
||||
// Initialize the hole left by sliding the tail forward
|
||||
for j in oldTailIndex..<newTailIndex {
|
||||
(elements + j).initialize(with: newValues[i])
|
||||
newValues._nextInPlace(&i)
|
||||
newValues.successor(updating: &i)
|
||||
}
|
||||
_expectEnd(i, newValues)
|
||||
}
|
||||
@@ -181,8 +181,8 @@ extension _ArrayBufferProtocol where Index == Int {
|
||||
var j = newValues.startIndex
|
||||
for _ in 0..<newCount {
|
||||
elements[i] = newValues[j]
|
||||
_nextInPlace(&i)
|
||||
newValues._nextInPlace(&j)
|
||||
successor(updating: &i)
|
||||
newValues.successor(updating: &j)
|
||||
}
|
||||
_expectEnd(j, newValues)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user