Error and Warning Free Pure Swift 4
This commit is contained in:
@@ -119,7 +119,7 @@ class FrequencyGraph: NSView {
|
||||
// Get offset
|
||||
offset = 0
|
||||
let time: String = data[point].components(separatedBy: ";")[0]
|
||||
let hour: Int = Int(time.substring(to: time.index(time.startIndex, offsetBy: 2)))!
|
||||
let hour: Int = Int(time[..<time.index(time.startIndex, offsetBy: 2)])!
|
||||
let tensSeconds: Int = Int((time as NSString).substring(with: NSMakeRange(6, 1)))!
|
||||
offset = ((hour*60 + Int((time as NSString).substring(with: NSMakeRange(3, 2)))!) * 6 + tensSeconds) * 2
|
||||
// Set offset
|
||||
@@ -144,10 +144,10 @@ class FrequencyGraph: NSView {
|
||||
// Set connection loss zones
|
||||
for loss in lastLossIndex..<dataLoss.count {
|
||||
let time1: String = data[point].components(separatedBy: ";")[0]
|
||||
let hour1: Int = Int(time1.substring(to: time1.index(time1.startIndex, offsetBy: 2)))!
|
||||
let hour1: Int = Int(time1[..<time1.index(time1.startIndex, offsetBy: 2)])!
|
||||
let minute1: Int = Int((time1 as NSString).substring(with: NSMakeRange(3, 2)))!
|
||||
let time2: String = dataLoss[loss]
|
||||
let hour2: Int = Int(time2.substring(to: time2.index(time2.startIndex, offsetBy: 2)))!
|
||||
let hour2: Int = Int(time2[..<time2.index(time2.startIndex, offsetBy: 2)])!
|
||||
let minute2: Int = Int((time2 as NSString).substring(with: NSMakeRange(3, 2)))!
|
||||
|
||||
if hour1 < hour2 { break }
|
||||
|
||||
@@ -30,7 +30,7 @@ class GraphLoadOperation: Operation {
|
||||
graph.data = FileOperations.loadUpstream(log: item.regularFileContents! as NSData)!
|
||||
}
|
||||
let keyString: String = item.filename!.components(separatedBy: " ")[1]
|
||||
graph.frequency = Double(keyString.substring(to: keyString.index(keyString.endIndex, offsetBy: -4)))! / 1000000
|
||||
graph.frequency = Double(keyString[..<keyString.index(keyString.endIndex, offsetBy: -4)])! / 1000000
|
||||
graph.initView(operation: self)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.1</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>491</string>
|
||||
<string>493</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.utilities</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
version 2.1
|
||||
build 491
|
||||
build 493
|
||||
|
||||
Reference in New Issue
Block a user