• R/O
  • HTTP
  • SSH
  • HTTPS

KCD: Commit

main code repository.


Commit MetaInfo

Revision0285e383a6949153632e914824ecec2747c541fd (tree)
Time2018-08-13 17:00:52
Authormasakih <masakih@user...>
Commitermasakih

Log Message

ArrayをSetに変更

containsを多用するため

Change Summary

Incremental Difference

--- a/KCD/API.swift
+++ b/KCD/API.swift
@@ -204,7 +204,7 @@ struct API {
204204 }
205205 }
206206
207- func includs(in rawValues: [String]) -> Bool {
207+ func includs(in rawValues: Set<String>) -> Bool {
208208
209209 return rawValues.contains(endpointString)
210210 }
--- a/KCD/IgnoreCommand.swift
+++ b/KCD/IgnoreCommand.swift
@@ -10,7 +10,7 @@ import Cocoa
1010
1111 final class IgnoreCommand: JSONCommand {
1212
13- private static let ignores: [String] = {
13+ private static let ignores: Set<String> = {
1414
1515 guard let url = Bundle.main.url(forResource: "IgnoreCommand", withExtension: "plist"),
1616 let array = NSArray(contentsOf: url) as? [String] else {
@@ -18,7 +18,7 @@ final class IgnoreCommand: JSONCommand {
1818 fatalError("Can not read IgnoreCommand.plist")
1919 }
2020
21- return array
21+ return Set(array)
2222 }()
2323
2424 override class func canExecuteAPI(_ api: API) -> Bool {
Show on old repository browser