use new if let

This commit is contained in:
Erik 2015-04-23 09:09:20 -04:00
parent 59e068c853
commit 27a767746b

View File

@ -103,11 +103,11 @@ class SocketParser {
}
}
if buf.toInt() == nil || arr[i] != "-" {
if let holders = buf.toInt() where arr[i] == "-" {
placeholders = holders
} else {
NSLog("Error parsing \(str)")
return nil
} else {
placeholders = buf.toInt()!
}
}