summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-12-04 02:42:58 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2021-12-04 02:43:33 +0100
commit6760397f6c242420612f57fcad357f3f4327cede (patch)
treee70f1b8f5aeca09f46e74a953d25e33cf0a07e27 /src
parentMerge pull request #833 from Bubu/clion_suggestions (diff)
downloadnheko-6760397f6c242420612f57fcad357f3f4327cede.tar.xz
Fix sanitizer warning about signed shifts
Diffstat (limited to 'src')
-rw-r--r--src/Utils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp
index 3a785ddb..27f0c42f 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -644,7 +644,8 @@ utils::hashQString(const QString &input)
 {
     auto h = QCryptographicHash::hash(input.toUtf8(), QCryptographicHash::Sha1);
 
-    return (h[0] << 24) ^ (h[1] << 16) ^ (h[2] << 8) ^ h[3];
+    return (static_cast<uint32_t>(h[0]) << 24) ^ (static_cast<uint32_t>(h[1]) << 16) ^
+           (static_cast<uint32_t>(h[2]) << 8) ^ static_cast<uint32_t>(h[3]);
 }
 
 QColor