Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove unnecessary UInt8 pointer binds (#524)
Motivation: The bytes that a Unsafe(Mutable)RawBufferPointers points to can be accessed directly as `UInt8`s. We didn't know that so we bind `ByteBuffer`s memory to `UInt8` so that we can access it as `UnsafePointer<UInt8>` using `assumingMemoryBound(to: UInt8.self)` in many places. Most of the time that is unnecessarily awkward and unnecessary. Modifications: - remove some easy instances where we access an `UnsafeMutableBufferPointer` as `UnsafeBufferPointer<UInt8>` just to read some `UInt8`s. Result: less awkward looking code
- Loading branch information
Showing
4 changed files
with
11 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters