OSDN Git Service

処理を簡素化
authormasakih <masakih@users.sourceforge.jp>
Thu, 12 Oct 2017 13:33:23 +0000 (22:33 +0900)
committermasakih <masakih@users.sourceforge.jp>
Thu, 12 Oct 2017 13:33:23 +0000 (22:33 +0900)
KCD/PowerUpSupportViewController.swift
KCD/StrengthenListItemView.swift
KCD/StrengthenListViewController.swift

index ca37712..1ce76f8 100644 (file)
@@ -60,7 +60,6 @@ final class PowerUpSupportViewController: MainTabVIewItemViewController {
         } catch {
             
             fatalError("PowerUpSupportViewController: can not fetch. \(error)")
-            
         }
         
         shipController.sortDescriptors = UserDefaults.standard[.powerupSupportSortDecriptors]
index 12e9e4b..c6c78c5 100644 (file)
@@ -14,7 +14,6 @@ final class StrengthenListItemView: NSBox {
         
         super.draw(dirtyRect)
         
-        let bounds = self.bounds
         let width = bounds.width
         let height = bounds.height
         
index 397bf10..5e10385 100644 (file)
@@ -124,16 +124,12 @@ final class StrengthenListViewController: MainTabVIewItemViewController {
         let nc = NotificationCenter.default
         nc.addObserver(forName: .Periodic, object: notifier, queue: nil) { [weak self] _ in
             
-            guard let `self` = self else { return }
-            
-            self.buildList()
+            self?.buildList()
         }
         
         nc.addObserver(forName: .Periodic, object: plistDownloadNotifier, queue: nil) { [weak self] _ in
             
-            guard let `self` = self else { return }
-            
-            self.downloadPList()
+            self?.downloadPList()
         }
         
         #if DEBUG