mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-24 16:40:21 +00:00
Support arbitrary pointer traits.
This commit is contained in:
parent
5e5f5f60e3
commit
c37ded0ae4
Notes:
sideshowbarker
2024-07-19 18:50:48 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c37ded0ae47
1 changed files with 6 additions and 0 deletions
|
@ -21,5 +21,11 @@ struct Traits<unsigned> {
|
|||
static void dump(unsigned u) { printf("%u", u); }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct Traits<T*> {
|
||||
static unsigned hash(const T* p) { return (unsigned)p; }
|
||||
static void dump(const T* p) { printf("%p", p); }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue