Go to the source code of this file.
◆ ID
Value: DC_PUBLIC static size_t type##_hash_id(type
const* key) { \
DC_STATIC_ASSERT(sizeof(type) <= sizeof(size_t), \
"ID hashing only supports up to size_t integers"); \
return (size_t)(*key); \
}
No hashing, just returns the integer value. For most circumstances with a key as a single integer, this is a good option.
Definition at line 8 of file id.h.
8#define ID(type, ...) \
9 DC_PUBLIC static size_t type##_hash_id(type const* key) { \
10 DC_STATIC_ASSERT(sizeof(type) <= sizeof(size_t), \
11 "ID hashing only supports up to size_t integers"); \
12 return (size_t)(*key); \
13 }