OSDN Git Service
(root)
/
kcd
/
KCD.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f539a84
)
処理を簡素化
author
masakih
<masakih@users.sourceforge.jp>
Sun, 10 Dec 2017 15:44:36 +0000
(
00:44
+0900)
committer
masakih
<masakih@users.sourceforge.jp>
Sun, 10 Dec 2017 15:44:36 +0000
(
00:44
+0900)
KCD/MaterialMapper.swift
patch
|
blob
|
history
diff --git
a/KCD/MaterialMapper.swift
b/KCD/MaterialMapper.swift
index
f0e9d2a
..
c80c775
100644
(file)
--- a/
KCD/MaterialMapper.swift
+++ b/
KCD/MaterialMapper.swift
@@
-67,11
+67,9
@@
final class MaterialMapper: JSONMapper {
private func register(_ material: Material, data: [Int]) {
-
data.enumerated(
).forEach {
+
zip(data, keys
).forEach {
- guard $0.offset < keys.count else { return }
-
- material.setValue($0.element as NSNumber, forKey: keys[$0.offset])
+ material.setValue($0, forKey: $1)
}
}