Update pod RxSwift, RxCocoa to 4.5.0
This commit is contained in:
@ -52,11 +52,7 @@ struct PriorityQueue<Element> {
|
||||
private mutating func removeAt(_ index: Int) {
|
||||
let removingLast = index == _elements.count - 1
|
||||
if !removingLast {
|
||||
#if swift(>=3.2)
|
||||
_elements.swapAt(index, _elements.count - 1)
|
||||
#else
|
||||
swap(&_elements[index], &_elements[_elements.count - 1])
|
||||
#endif
|
||||
}
|
||||
|
||||
_ = _elements.popLast()
|
||||
@ -76,11 +72,7 @@ struct PriorityQueue<Element> {
|
||||
while unbalancedIndex > 0 {
|
||||
let parentIndex = (unbalancedIndex - 1) / 2
|
||||
guard _hasHigherPriority(_elements[unbalancedIndex], _elements[parentIndex]) else { break }
|
||||
#if swift(>=3.2)
|
||||
_elements.swapAt(unbalancedIndex, parentIndex)
|
||||
#else
|
||||
swap(&_elements[unbalancedIndex], &_elements[parentIndex])
|
||||
#endif
|
||||
unbalancedIndex = parentIndex
|
||||
}
|
||||
}
|
||||
@ -105,12 +97,8 @@ struct PriorityQueue<Element> {
|
||||
}
|
||||
|
||||
guard highestPriorityIndex != unbalancedIndex else { break }
|
||||
|
||||
#if swift(>=3.2)
|
||||
_elements.swapAt(highestPriorityIndex, unbalancedIndex)
|
||||
#else
|
||||
swap(&_elements[highestPriorityIndex], &_elements[unbalancedIndex])
|
||||
#endif
|
||||
|
||||
unbalancedIndex = highestPriorityIndex
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user