Skip to content

Commit 8699396

Browse files
authored
Optimize overflow for DynamicContainerInfo.updateValue() (#692)
1 parent d92457e commit 8699396

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/OpenSwiftUICore/Layout/Dynamic/DynamicContainer.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,9 @@ struct DynamicContainerInfo<Adapter>: StatefulRule, AsyncAttribute, ObservedAttr
359359
if needsUpdate {
360360
let totalCount = info.items.count
361361
let unusedCount = info.unusedCount
362-
let inusedCount = totalCount - unusedCount
362+
let inusedCount = totalCount &- unusedCount
363363
let removedCount = info.removedCount
364-
let validCount = inusedCount - removedCount
364+
let validCount = inusedCount &- removedCount
365365
if validCount < inusedCount {
366366
var slice = info.items[validCount..<inusedCount]
367367
slice.sort { $0.removalOrder < $1.removalOrder }

0 commit comments

Comments
 (0)