OSDN Git Service

処理を単純化
authormasakih <masakih@users.sourceforge.jp>
Mon, 13 Aug 2018 13:37:33 +0000 (22:37 +0900)
committermasakih <masakih@users.sourceforge.jp>
Mon, 13 Aug 2018 13:37:33 +0000 (22:37 +0900)
KCD/InformationTabViewController.swift

index b4332d3..201af57 100644 (file)
@@ -54,10 +54,9 @@ func shipTypePredicte(for type: ShipTabType) -> NSPredicate? {
         
     case .other:
         let omitTypes = shipTypeCategories
-            .lazy
-            .enumerated()
-            .filter { $0.offset != 0 && $0.offset != 7 }
-            .flatMap { $0.element }
+            .dropLast()
+            .dropFirst()
+            .flatMap { $0 }
         
         return .not(NSPredicate(#keyPath(Ship.master_ship.stype.id), valuesIn: omitTypes))