summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qhash.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-03-13 18:39:03 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2016-03-13 19:27:21 +0000
commit59a3ca679ede2cb9b6a162edf8eba5cf6d9af4a9 (patch)
tree0d0f76caa042db299cddaa84c14c28e4c80b2ffd /src/corelib/tools/qhash.cpp
parent447a508d003ce487f2be69af9ab05aeec272e64d (diff)
parent50d0f57b77b8088875d7185c5906b5f57985d5fb (diff)
Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7
Diffstat (limited to 'src/corelib/tools/qhash.cpp')
-rw-r--r--src/corelib/tools/qhash.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
index 1001f2a06c..8ab98bd509 100644
--- a/src/corelib/tools/qhash.cpp
+++ b/src/corelib/tools/qhash.cpp
@@ -113,24 +113,24 @@ static uint crc32(const Char *ptr, size_t len, uint h)
p += 8;
for ( ; p <= e; p += 8)
- h2 = _mm_crc32_u64(h2, *reinterpret_cast<const qlonglong *>(p - 8));
+ h2 = _mm_crc32_u64(h2, qUnalignedLoad<qlonglong>(p - 8));
h = h2;
p -= 8;
len = e - p;
if (len & 4) {
- h = _mm_crc32_u32(h, *reinterpret_cast<const uint *>(p));
+ h = _mm_crc32_u32(h, qUnalignedLoad<uint>(p));
p += 4;
}
# else
p += 4;
for ( ; p <= e; p += 4)
- h = _mm_crc32_u32(h, *reinterpret_cast<const uint *>(p - 4));
+ h = _mm_crc32_u32(h, qUnalignedLoad<uint>(p - 4));
p -= 4;
len = e - p;
# endif
if (len & 2) {
- h = _mm_crc32_u16(h, *reinterpret_cast<const ushort *>(p));
+ h = _mm_crc32_u16(h, qUnalignedLoad<ushort>(p));
p += 2;
}
if (sizeof(Char) == 1 && len & 1)