1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-02-16 18:30:32 +00:00

Slightly simplified Swift usage.

This commit is contained in:
Thomas Harte 2016-01-04 23:44:36 -05:00
parent 616dc0b57c
commit c69b3256ba

View File

@ -31,7 +31,7 @@ class Atari2600Document: MachineDocument {
return "Atari2600Document"
}
private var atari2600: CSAtari2600! = nil
private var atari2600 = CSAtari2600()
override func dataOfType(typeName: String) throws -> NSData {
// Insert code here to write your document to data of the specified type. If outError != nil, ensure that you create and set an appropriate error when returning nil.
// You can also choose to override fileWrapperOfType:error:, writeToURL:ofType:error:, or writeToURL:ofType:forSaveOperation:originalContentsURL:error: instead.
@ -39,7 +39,6 @@ class Atari2600Document: MachineDocument {
}
override func readFromData(data: NSData, ofType typeName: String) throws {
atari2600 = CSAtari2600()
atari2600.setROM(data)
}