diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-06-26 11:32:55 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-06-26 11:33:19 +0200 |
commit | 7810209ba32fcebfa90b081670595daaa5333a78 (patch) | |
tree | 98410d5cc7d9d762bbde0cb4eae8041aa6e2e542 /src/corelib/tools/qvarlengtharray.h | |
parent | 6f2eabb54e3f827ebd2b90f68144b86342933869 (diff) | |
parent | 88625709058b386ee74cca536c6c5556159c99fa (diff) |
Merge remote-tracking branch 'origin/dev' into wip/qt6
Change-Id: I4ea2b77cc201daed94fbe321f146dfd20365a534
Diffstat (limited to 'src/corelib/tools/qvarlengtharray.h')
-rw-r--r-- | src/corelib/tools/qvarlengtharray.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/tools/qvarlengtharray.h b/src/corelib/tools/qvarlengtharray.h index 01fc63b677..a49e0af687 100644 --- a/src/corelib/tools/qvarlengtharray.h +++ b/src/corelib/tools/qvarlengtharray.h @@ -44,6 +44,7 @@ #include <QtCore/qglobal.h> #include <QtCore/qalgorithms.h> #include <QtCore/qcontainertools_impl.h> +#include <QtCore/qhashfunctions.h> #include <algorithm> #include <initializer_list> @@ -599,6 +600,13 @@ inline bool operator>=(const QVarLengthArray<T, Prealloc1> &lhs, const QVarLengt return !(lhs < rhs); } +template <typename T, int Prealloc> +uint qHash(const QVarLengthArray<T, Prealloc> &key, uint seed = 0) + noexcept(noexcept(qHashRange(key.cbegin(), key.cend(), seed))) +{ + return qHashRange(key.cbegin(), key.cend(), seed); +} + QT_END_NAMESPACE #endif // QVARLENGTHARRAY_H |