Fix more warnings

This commit is contained in:
Ali
2021-08-05 12:37:57 +02:00
parent 6b3103bafc
commit 0a9be38425
83 changed files with 693 additions and 930 deletions

View File

@@ -8,7 +8,12 @@ private struct SettingsSearchRecentQueryItemId {
public let rawValue: MemoryBuffer
var value: Int64 {
return self.rawValue.makeData().withUnsafeBytes { $0.pointee } as Int64
return self.rawValue.makeData().withUnsafeBytes { buffer -> Int64 in
guard let bytes = buffer.baseAddress?.assumingMemoryBound(to: Int64.self) else {
return 0
}
return bytes.pointee
}
}
init(_ rawValue: MemoryBuffer) {