mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-08 08:04:08 +02:00
Get rid of QByteArray in djbStringHash
This commit is contained in:
parent
817610ddd7
commit
cc736158a6
1 changed files with 2 additions and 3 deletions
|
@ -469,9 +469,8 @@ bool IsSNIAvailable() {
|
||||||
|
|
||||||
uint djbStringHash(const std::string &string) {
|
uint djbStringHash(const std::string &string) {
|
||||||
uint hash = 5381;
|
uint hash = 5381;
|
||||||
const auto chars = QByteArray::fromStdString(string.data());
|
for (const auto &curChar : string) {
|
||||||
for(int i = 0; i < chars.length(); i++){
|
hash = (hash << 5) + hash + curChar;
|
||||||
hash = (hash << 5) + hash + chars[i];
|
|
||||||
}
|
}
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue