Add checks for pre-existing type declarations.

This commit is contained in:
gingerBill
2020-03-02 18:48:52 +00:00
parent 56240240f6
commit 10cde925ca
2 changed files with 606 additions and 164 deletions

View File

@@ -55,12 +55,14 @@ gb_inline HashKey hash_string(String s) {
gb_inline HashKey hash_pointer(void *ptr) {
HashKey h = {HashKey_Ptr};
h.key = cast(u64)cast(uintptr)ptr;
// h.key = gb_fnv64a(&ptr, gb_size_of(void *));
h.ptr = ptr;
return h;
}
gb_inline HashKey hash_ptr_and_id(void *ptr, u64 id) {
HashKey h = {HashKey_PtrAndId};
h.key = cast(u64)cast(uintptr)ptr;
// h.key = gb_fnv64a(&ptr, gb_size_of(void *));
h.ptr_and_id.ptr = ptr;
h.ptr_and_id.id = id;
return h;