From 55ad2c33b1ea4688925047ea9a7e36792b8f513e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Sun, 13 Oct 2024 22:33:13 +0200 Subject: [PATCH] QHash: Fix typo for heterogeneous lookup feature searchable was missing an 'r'. Change-Id: I9532fa4d849c48a16495fe1cbd924ab781d6366d Reviewed-by: Fabian Kosmale Reviewed-by: Thiago Macieira (cherry picked from commit 7a6ecc3e5d4d55709508d6c93414b4af57575a4c) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/tools/qhash.h | 70 +++++++++++++++--------------- src/corelib/tools/qhashfunctions.h | 4 +- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index 1e327b4e5b1..8446e82624a 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -1378,33 +1378,33 @@ private: } template - using if_heterogeneously_seachable = QHashPrivate::if_heterogeneously_seachable_with; + using if_heterogeneously_searchable = QHashPrivate::if_heterogeneously_searchable_with; template using if_key_constructible_from = std::enable_if_t, bool>; public: - template = true> + template = true> bool remove(const K &key) { return removeImpl(key); } - template = true> + template = true> T take(const K &key) { return takeImpl(key); } - template = true> + template = true> bool contains(const K &key) const { return d ? d->findNode(key) != nullptr : false; } - template = true> + template = true> qsizetype count(const K &key) const { return contains(key) ? 1 : 0; } - template = true> + template = true> T value(const K &key) const noexcept { if (auto *v = valueImpl(key)) @@ -1412,7 +1412,7 @@ public: else return T(); } - template = true> + template = true> T value(const K &key, const T &defaultValue) const noexcept { if (auto *v = valueImpl(key)) @@ -1420,39 +1420,39 @@ public: else return defaultValue; } - template = true, if_key_constructible_from = true> + template = true, if_key_constructible_from = true> T &operator[](const K &key) { return operatorIndexImpl(key); } - template = true> + template = true> const T operator[](const K &key) const noexcept { return value(key); } - template = true> + template = true> std::pair equal_range(const K &key) { return equal_range_impl(*this, key); } - template = true> + template = true> std::pair equal_range(const K &key) const noexcept { return equal_range_impl(*this, key); } - template = true> + template = true> iterator find(const K &key) { return findImpl(key); } - template = true> + template = true> const_iterator find(const K &key) const noexcept { return constFindImpl(key); } - template = true> + template = true> const_iterator constFind(const K &key) const noexcept { return find(key); @@ -2390,30 +2390,30 @@ private: } template - using if_heterogeneously_seachable = QHashPrivate::if_heterogeneously_seachable_with; + using if_heterogeneously_searchable = QHashPrivate::if_heterogeneously_searchable_with; template using if_key_constructible_from = std::enable_if_t, bool>; public: - template = true> + template = true> qsizetype remove(const K &key) { return removeImpl(key); } - template = true> + template = true> T take(const K &key) { return takeImpl(key); } - template = true> + template = true> bool contains(const K &key) const noexcept { if (!d) return false; return d->findNode(key) != nullptr; } - template = true> + template = true> T value(const K &key) const noexcept { if (auto *v = valueImpl(key)) @@ -2421,7 +2421,7 @@ public: else return T(); } - template = true> + template = true> T value(const K &key, const T &defaultValue) const noexcept { if (auto *v = valueImpl(key)) @@ -2429,78 +2429,78 @@ public: else return defaultValue; } - template = true, if_key_constructible_from = true> + template = true, if_key_constructible_from = true> T &operator[](const K &key) { return operatorIndexImpl(key); } - template = true> + template = true> const T operator[](const K &key) const noexcept { return value(key); } - template = true> + template = true> QList values(const K &key) { return valuesImpl(key); } - template = true> + template = true> iterator find(const K &key) { return findImpl(key); } - template = true> + template = true> const_iterator constFind(const K &key) const noexcept { return constFindImpl(key); } - template = true> + template = true> const_iterator find(const K &key) const noexcept { return constFindImpl(key); } - template = true> + template = true> bool contains(const K &key, const T &value) const noexcept { return containsImpl(key, value); } - template = true> + template = true> qsizetype remove(const K &key, const T &value) { return removeImpl(key, value); } - template = true> + template = true> qsizetype count(const K &key) const noexcept { return countImpl(key); } - template = true> + template = true> qsizetype count(const K &key, const T &value) const noexcept { return countImpl(key, value); } - template = true> + template = true> iterator find(const K &key, const T &value) { return findImpl(key, value); } - template = true> + template = true> const_iterator constFind(const K &key, const T &value) const noexcept { return constFindImpl(key, value); } - template = true> + template = true> const_iterator find(const K &key, const T &value) const noexcept { return constFind(key, value); } - template = true> + template = true> std::pair equal_range(const K &key) { return equal_range_impl(key); } - template = true> + template = true> std::pair equal_range(const K &key) const noexcept { diff --git a/src/corelib/tools/qhashfunctions.h b/src/corelib/tools/qhashfunctions.h index a865c055d10..8731ff08000 100644 --- a/src/corelib/tools/qhashfunctions.h +++ b/src/corelib/tools/qhashfunctions.h @@ -269,7 +269,7 @@ using HeterogeneouslySearchableWith = HeterogeneouslySearchableWithHelper< >; template -using if_heterogeneously_seachable_with = std::enable_if_t< +using if_heterogeneously_searchable_with = std::enable_if_t< QHashPrivate::HeterogeneouslySearchableWith::value, bool>; @@ -281,7 +281,7 @@ bool qHashEquals(const T &a, const T &b) return a == b; } -template = true> +template = true> bool qHashEquals(const T1 &a, const T2 &b) { return a == b;