mirror of https://github.com/apple/pkl-swift
Optimize memory allocation for array in PklDecoder.decodePolymorphic (#25)
This commit is contained in:
parent
48bdb4f503
commit
8f050f5938
|
@ -205,6 +205,7 @@ extension _PklDecoder {
|
|||
))
|
||||
}
|
||||
var arr: [AnyHashable?] = []
|
||||
arr.reserveCapacity(pklArray.count)
|
||||
for v in pklArray {
|
||||
try arr.append(self.decodePolymorphic(v, codingPath: codingPath)?.value)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue