From 018ae9c7fafb9082eb4fcdb39758a25e5e0a0f0a Mon Sep 17 00:00:00 2001 From: Vincent Esche Date: Fri, 12 Apr 2019 23:57:05 +0200 Subject: [PATCH] Migrated to Swift 4.2 --- .swift-version | 2 +- .../HCKalmanFilter Sample/AppCore/MapService.swift | 4 ++-- .../ViewControllers/ViewController.swift | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.swift-version b/.swift-version index 8c50098..bf77d54 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -3.1 +4.2 diff --git a/HCKalmanFilter Sample/HCKalmanFilter Sample/AppCore/MapService.swift b/HCKalmanFilter Sample/HCKalmanFilter Sample/AppCore/MapService.swift index 1e070a7..244519e 100644 --- a/HCKalmanFilter Sample/HCKalmanFilter Sample/AppCore/MapService.swift +++ b/HCKalmanFilter Sample/HCKalmanFilter Sample/AppCore/MapService.swift @@ -84,10 +84,10 @@ class MapService: NSObject, CLLocationManagerDelegate var timePassed: TimeInterval = 0 if myMapService.startTimes.count > 1 { for i in 0...myMapService.startTimes.count - 2 { - timePassed.add(myMapService.endTimes[i].timeIntervalSince(myMapService.startTimes[i])) + timePassed += myMapService.endTimes[i].timeIntervalSince(myMapService.startTimes[i]) } } - timePassed.add(Date().timeIntervalSince(myMapService.startTimes.last!)) + timePassed += Date().timeIntervalSince(myMapService.startTimes.last!) return timePassed } diff --git a/HCKalmanFilter Sample/HCKalmanFilter Sample/ViewControllers/ViewController.swift b/HCKalmanFilter Sample/HCKalmanFilter Sample/ViewControllers/ViewController.swift index 41b87e6..0ea1b46 100644 --- a/HCKalmanFilter Sample/HCKalmanFilter Sample/ViewControllers/ViewController.swift +++ b/HCKalmanFilter Sample/HCKalmanFilter Sample/ViewControllers/ViewController.swift @@ -60,7 +60,7 @@ class ViewController: UIViewController { AppNotify.removeObserver(self) } - func locationUpdated() + @objc func locationUpdated() { isLocationSet = true