This commit is contained in:
Christian Treffs 2020-07-09 22:23:12 +02:00
parent 65caa8ac70
commit 259643cd8e
No known key found for this signature in database
GPG Key ID: 49A4B4B460BE3ED4
1 changed files with 1 additions and 2 deletions

View File

@ -85,7 +85,7 @@ extension EntityComponentHash {
}
// MARK: - string hashing
/// https://stackoverflow.com/a/52440609
/// <https://stackoverflow.com/a/52440609>
public enum StringHashing {
/// *Waren Singer djb2*
///
@ -111,7 +111,6 @@ public enum StringHashing {
var iter = string.unicodeScalars.makeIterator()
while let char = iter.next() {
hash = (hash << 5) &+ hash &+ UInt(char.value)
//hash = ((hash << 5) + hash) + UInt(c.value)
}
return hash
}