diff options
Diffstat (limited to 'tests/benchmarks/corelib/tools/qhash/outofline.cpp')
-rw-r--r-- | tests/benchmarks/corelib/tools/qhash/outofline.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/benchmarks/corelib/tools/qhash/outofline.cpp b/tests/benchmarks/corelib/tools/qhash/outofline.cpp index 6ad1a4c52a..5b16c36ffb 100644 --- a/tests/benchmarks/corelib/tools/qhash/outofline.cpp +++ b/tests/benchmarks/corelib/tools/qhash/outofline.cpp @@ -1,11 +1,11 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "tst_bench_qhash.h" QT_BEGIN_NAMESPACE -size_t qHash(const Qt4String &str) +size_t qHash(const Qt4String &str, size_t /* never used */) { qsizetype n = str.size(); const QChar *p = str.unicode(); @@ -40,9 +40,9 @@ size_t qHash(const Qt50String &key, size_t seed) // Still, we can avoid writing the multiplication as "(h << 5) - h" // -- the compiler will turn it into a shift and an addition anyway // (for instance, gcc 4.4 does that even at -O0). -size_t qHash(const JavaString &str) +size_t qHash(const JavaString &str, size_t /* never used */) { - const unsigned short *p = (unsigned short *)str.constData(); + const auto *p = reinterpret_cast<const char16_t *>(str.constData()); const qsizetype len = str.size(); uint h = 0; |