• R/O
  • HTTP
  • SSH
  • HTTPS

KCD: Commit

main code repository.


Commit MetaInfo

Revision4f07468b83fd2faf5c0a21696b2fa17bafa699e5 (tree)
Time2018-08-12 20:34:52
Authormasakih <masakih@user...>
Commitermasakih

Log Message

containsを多用するArrayのうちSetに置換可能なものをSetに変更

Change Summary

Incremental Difference

--- a/KCD/AnchorageRepairManager.swift
+++ b/KCD/AnchorageRepairManager.swift
@@ -14,7 +14,7 @@ final class AnchorageRepairManager: NSObject {
1414 static let `default`: AnchorageRepairManager = AnchorageRepairManager()
1515
1616 private let fleetManager = AppDelegate.shared.fleetManager
17- private let repairShipTypeIds: [Int] = [19]
17+ private let repairShipTypeIds: Set<Int> = [19]
1818
1919 override init() {
2020
--- a/KCD/JSONMapper.swift
+++ b/KCD/JSONMapper.swift
@@ -16,13 +16,13 @@ struct MappingConfiguration<T: Entity> {
1616 let dataKeys: [String]
1717 let primaryKeys: [String]
1818 let editorStore: CoreDataAccessor
19- let ignoreKeys: [String]
19+ let ignoreKeys: Set<String>
2020
2121 init(entity: T.Type,
2222 dataKeys: [String] = ["api_data"],
2323 primaryKeys: [String] = ["id"],
2424 editorStore: CoreDataAccessor,
25- ignoreKeys: [String] = []) {
25+ ignoreKeys: Set<String> = []) {
2626
2727 self.entity = entity
2828 self.dataKeys = dataKeys
--- a/KCD/KCManagedObject.swift
+++ b/KCD/KCManagedObject.swift
@@ -17,15 +17,7 @@ enum KCManagedObjectError: Error {
1717
1818 class KCManagedObject: NSManagedObject {
1919
20- private static let intValueKyes =
21- [
22- "api_enqflg", "api_aftershipid", "api_progress", "api_usebull",
23- "api_flagship", "api_name_id",
24- "api_comment_id", "api_nickname_id", "api_member_id",
25- "api_flag_0", "api_flag_1", "api_flag_2", "api_flag_3", "api_flag_4",
26- "api_flag_5", "api_flag_6", "api_flag_7",
27- "api_level"
28- ]
20+ private static let intValueKyes: Set<String> = ["api_aftershipid", "api_level"]
2921
3022 override func validateValue(_ value: AutoreleasingUnsafeMutablePointer<AnyObject?>, forKey key: String) throws {
3123
--- a/KCD/ShipMapper.swift
+++ b/KCD/ShipMapper.swift
@@ -11,14 +11,14 @@ import SwiftyJSON
1111
1212 final class ShipMapper: JSONMapper {
1313
14- private static let ignoreKeys = ["api_gomes", "api_gomes2", "api_broken", "api_powup",
15- "api_voicef", "api_afterlv", "api_aftershipid", "api_backs",
16- "api_slotnum", "api_stype", "api_name", "api_yomi",
17- "api_raig", "api_luck", "api_saku", "api_raim", "api_baku",
18- "api_taik", "api_houg", "api_houm", "api_tyku",
19- "api_ndock_item", "api_star",
20- "api_ndock_time_str", "api_member_id",
21- "api_fuel_max", "api_bull_max"]
14+ private static let ignoreKeys: Set<String> = ["api_gomes", "api_gomes2", "api_broken", "api_powup",
15+ "api_voicef", "api_afterlv", "api_aftershipid", "api_backs",
16+ "api_slotnum", "api_stype", "api_name", "api_yomi",
17+ "api_raig", "api_luck", "api_saku", "api_raim", "api_baku",
18+ "api_taik", "api_houg", "api_houm", "api_tyku",
19+ "api_ndock_item", "api_star",
20+ "api_ndock_time_str", "api_member_id",
21+ "api_fuel_max", "api_bull_max"]
2222
2323 let apiResponse: APIResponse
2424 let configuration: MappingConfiguration<Ship>
Show on old repository browser