[pushed] Use correct types in string-set.h

Message ID 20250312203132.2629258-1-tom@tromey.com
State New
Headers
Series [pushed] Use correct types in string-set.h |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply

Commit Message

Tom Tromey March 12, 2025, 8:31 p.m. UTC
  My earlier patch to introduce string-set.h used the wrong type in the
hash functions.  This patch fixes the error.
---
 gdbsupport/string-set.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/gdbsupport/string-set.h b/gdbsupport/string-set.h
index c2507454650..c9078fc1ad1 100644
--- a/gdbsupport/string-set.h
+++ b/gdbsupport/string-set.h
@@ -109,12 +109,12 @@  class string_set
     using is_transparent = void;
     using is_avalanching = void;
 
-    bool operator() (const local_string &rhs) const noexcept
+    uint64_t operator() (const local_string &rhs) const noexcept
     {
       return (*this) (rhs.as_view ());
     }
 
-    bool operator() (std::string_view rhs) const noexcept
+    uint64_t operator() (std::string_view rhs) const noexcept
     {
       return ankerl::unordered_dense::hash<std::string_view> () (rhs);
     }