Skip to content

Commit

Permalink
Start to get rid of ++.
Browse files Browse the repository at this point in the history
  • Loading branch information
schwa committed Oct 14, 2024
1 parent 8fe40f0 commit 3c17c05
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Sources/GaussianSplatSupport/Sorting/CPURadixSort.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ postfix operator ++
extension BinaryInteger {
@available(*, deprecated, message: "Deprecated")
static postfix func ++ (rhs: inout Self) -> Self {
let oldValue = rhs
rhs += 1
rhs.postIncrement()
}

mutating func postIncrement() -> Self {
let oldValue = self
self += 1
return oldValue
}
}
Expand Down

0 comments on commit 3c17c05

Please sign in to comment.