fix(ios): silence device build warnings

This commit is contained in:
Peter Steinberger
2025-12-26 18:01:48 +01:00
parent ed2e738ea4
commit 541b8cbb6c
3 changed files with 16 additions and 17 deletions

View File

@@ -74,13 +74,7 @@ public enum WakeWordGate {
let count = trigger.tokens.count
guard count > 0, tokens.count > count else { continue }
for i in 0...(tokens.count - count - 1) {
var matched = true
for t in 0..<count {
if tokens[i + t].normalized != trigger.tokens[t] {
matched = false
break
}
}
let matched = (0..<count).allSatisfy { tokens[i + $0].normalized == trigger.tokens[$0] }
if !matched { continue }
let triggerEnd = tokens[i + count - 1].end