Adopted the standard withCString for C strings throughout the library.
This commit is contained in:
@@ -33,7 +33,7 @@ extension Sound {
|
||||
|
||||
/// Prepares the player to stream the file at `path`.
|
||||
public func load(path: String) throws(PlaydateError) {
|
||||
let loaded = path.withPlaydateCString {
|
||||
let loaded = path.withCString {
|
||||
FilePlayer.api.pointee.loadIntoPlayer.unsafelyUnwrapped(pointer, $0) != 0
|
||||
}
|
||||
if !loaded {
|
||||
|
||||
Reference in New Issue
Block a user