mirror of
https://github.com/tsolomko/SWCompression.git
synced 2026-06-23 14:56:41 +00:00
Remove unused extensions
This commit is contained in:
@@ -5,27 +5,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
extension Data {
|
||||
|
||||
@inline(__always)
|
||||
func to<T>(type: T.Type) -> T {
|
||||
return self.withUnsafeBytes { $0.pointee }
|
||||
}
|
||||
|
||||
@inline(__always)
|
||||
func toArray<T>(type: T.Type, count: Int) -> [T] {
|
||||
return self.withUnsafeBytes {
|
||||
[T](UnsafeBufferPointer(start: $0, count: count))
|
||||
}
|
||||
}
|
||||
|
||||
@inline(__always)
|
||||
func toArray<T>(type: T.Type) -> [T] {
|
||||
return self.toArray(type: type, count: self.count / MemoryLayout<T>.size)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension UnsignedInteger {
|
||||
|
||||
@inline(__always)
|
||||
|
||||
Reference in New Issue
Block a user