summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Hash.cpp
diff options
context:
space:
mode:
authorMai <mai.iam2048@gmail.com>2022-12-11 21:19:43 +0000
committerGitHub <noreply@github.com>2022-12-11 21:19:43 +0000
commita1c4861ad8666b622f96266a20af6e8e787c9693 (patch)
treecc8ac1e147f9a6aafb8b42c5a8563dc53902c52e /Source/Core/Common/Hash.cpp
parentaa57d53c901a0ce6dcdf48c1859fb0c728883306 (diff)
parent454537d53efd0579d4cd2a48108f3bdb490b08d2 (diff)
Merge pull request #10950 from JosJuice/replace-bitutils-rotate
Replace BitUtils with C++20: RotateLeft/RotateRight
Diffstat (limited to 'Source/Core/Common/Hash.cpp')
-rw-r--r--Source/Core/Common/Hash.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/Core/Common/Hash.cpp b/Source/Core/Common/Hash.cpp
index f11ac4d62c..e6b421e96f 100644
--- a/Source/Core/Common/Hash.cpp
+++ b/Source/Core/Common/Hash.cpp
@@ -4,7 +4,9 @@
#include "Common/Hash.h"
#include <algorithm>
+#include <bit>
#include <cstring>
+
#include <zlib.h>
#include "Common/BitUtils.h"
@@ -60,15 +62,15 @@ static u64 getblock(const u64* p, int i)
static void bmix64(u64& h1, u64& h2, u64& k1, u64& k2, u64& c1, u64& c2)
{
k1 *= c1;
- k1 = Common::RotateLeft(k1, 23);
+ k1 = std::rotl(k1, 23);
k1 *= c2;
h1 ^= k1;
h1 += h2;
- h2 = Common::RotateLeft(h2, 41);
+ h2 = std::rotl(h2, 41);
k2 *= c2;
- k2 = Common::RotateLeft(k2, 23);
+ k2 = std::rotl(k2, 23);
k2 *= c1;
h2 ^= k2;
h2 += h1;