#pragma once #include "kstdio.h" #include "HashFunctions.h" namespace AK { template struct Traits { }; template<> struct Traits { static unsigned hash(int i) { return intHash(i); } static void dump(int i) { kprintf("%d", i); } }; template<> struct Traits { static unsigned hash(unsigned u) { return intHash(u); } static void dump(unsigned u) { kprintf("%u", u); } }; template struct Traits { static unsigned hash(const T* p) { #ifdef SERENITY return intHash((dword)p); #else return intHash((ptrdiff_t)p & 0xffffffff); #endif } static void dump(const T* p) { kprintf("%p", p); } }; }