Less TODO

This commit is contained in:
Gwendal Roué committed 2016-05-08 19:49:34 +02:00
1 parent d7e0e44de0
commit e1bb98ec94
1 file changed
+3 -4
+3 -4
View File
@@ -128,13 +128,12 @@ extension DatabaseReader {
try read { dbFrom in
try writer.write { dbDest in
let backup = sqlite3_backup_init(dbDest.sqliteConnection, "main", dbFrom.sqliteConnection, "main")
// TODO: use the future Int <-> Pointer APIs https://github.com/apple/swift-evolution/blob/master/proposals/0016-initializers-for-converting-unsafe-pointers-to-ints.md
guard backup != unsafeBitCast(Int(SQLITE_ERROR), COpaquePointer.self) else {
throw DatabaseError(code: SQLITE_ERROR)
}
guard backup != nil else {
throw DatabaseError(code: dbDest.lastErrorCode, message: dbDest.lastErrorMessage)
}
guard backup != unsafeBitCast(Int(SQLITE_ERROR), COpaquePointer.self) else {
throw DatabaseError(code: SQLITE_ERROR)
}
afterBackupInit?()