]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Use correct types in string-set.h
authorTom Tromey <tom@tromey.com>
Tue, 11 Mar 2025 21:13:49 +0000 (15:13 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 12 Mar 2025 20:23:50 +0000 (14:23 -0600)
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

index c25074546508c9eca8a0e5ed0d06f2140616a9a0..c9078fc1ad154d7d7647932e2c82a69c04690131 100644 (file)
@@ -109,12 +109,12 @@ private:
     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);
     }