Specialize std::hash for ptid_t

This changes hash_ptid to instead be a specialization of std::hash.
This makes it a little easier to use with standard containers.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2023-09-11 08:45:37 -06:00
parent 14432bde07
commit 9a343d2bb5
3 changed files with 4 additions and 5 deletions

View File

@@ -462,7 +462,7 @@ public:
/* A map of ptid_t to thread_info*, for average O(1) ptid_t lookup.
Exited threads do not appear in the map. */
std::unordered_map<ptid_t, thread_info *, hash_ptid> ptid_thread_map;
std::unordered_map<ptid_t, thread_info *> ptid_thread_map;
/* Returns a range adapter covering the inferior's threads,
including exited threads. Used like this: