From d2080b0dd38296d02f1e80f9814d2a11a1efe637 Mon Sep 17 00:00:00 2001 From: Jinwoo Kim Date: Wed, 31 Dec 2025 23:15:06 +0900 Subject: [PATCH] Optimize overflow for DynamicContainerInfo.updateValue() --- Sources/OpenSwiftUICore/Layout/Dynamic/DynamicContainer.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/OpenSwiftUICore/Layout/Dynamic/DynamicContainer.swift b/Sources/OpenSwiftUICore/Layout/Dynamic/DynamicContainer.swift index 216f0a3a5..a44e40df1 100644 --- a/Sources/OpenSwiftUICore/Layout/Dynamic/DynamicContainer.swift +++ b/Sources/OpenSwiftUICore/Layout/Dynamic/DynamicContainer.swift @@ -359,9 +359,9 @@ struct DynamicContainerInfo: StatefulRule, AsyncAttribute, ObservedAttr if needsUpdate { let totalCount = info.items.count let unusedCount = info.unusedCount - let inusedCount = totalCount - unusedCount + let inusedCount = totalCount &- unusedCount let removedCount = info.removedCount - let validCount = inusedCount - removedCount + let validCount = inusedCount &- removedCount if validCount < inusedCount { var slice = info.items[validCount..