[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:
Dave Abrahams
2016-03-22 17:08:28 -07:00
parent d9a2b45449
commit 8d9e62b274
49 changed files with 319 additions and 319 deletions

View File

@@ -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)