diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp index 7a9f7d846b..605412c3d5 100644 --- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp @@ -469,9 +469,8 @@ bool IsSNIAvailable() { uint djbStringHash(const std::string &string) { uint hash = 5381; - const auto chars = QByteArray::fromStdString(string.data()); - for(int i = 0; i < chars.length(); i++){ - hash = (hash << 5) + hash + chars[i]; + for (const auto &curChar : string) { + hash = (hash << 5) + hash + curChar; } return hash; }