Use overflow subtraction operator

This commit is contained in:
Justin Mazzocchi 2020-09-06 16:11:56 -07:00
parent a689463907
commit 9e8b91e23b
No known key found for this signature in database
GPG Key ID: E223E6937AAFB01C
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ private extension DeterministicHasher {
case .djb2a:
return ((result << 5) &+ result ^ next) % Self.u32mod
case .sdbm:
return next &+ (result << 6) &+ (result << 16) - result
return next &+ (result << 6) &+ (result << 16) &- result
case .fnv1:
return (result * Self.fnvPrime % Self.u32mod) ^ next
case .fnv1a: