Hashmaps now forward declare the necessary methods
This commit is contained in:
+3
-1
@@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
|
|
||||||
#define define_hash_map(type, name) \
|
#define define_hash_map(type, name) \
|
||||||
|
bool hm_objects_match(type,type); \
|
||||||
|
u32 hm_hash(type); \
|
||||||
\
|
\
|
||||||
struct name##_Hash_Map_Cell { \
|
struct name##_Hash_Map_Cell { \
|
||||||
type original; \
|
type original; \
|
||||||
@@ -98,7 +100,7 @@
|
|||||||
return nullptr; \
|
return nullptr; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
inline void hm_delete_object(name##_Hash_Map* hm, char* key) { \
|
inline void hm_delete_object(name##_Hash_Map* hm, type key) { \
|
||||||
int index = hm_get_index_of_living_cell_if_it_exists(hm, key, hm_hash(key)); \
|
int index = hm_get_index_of_living_cell_if_it_exists(hm, key, hm_hash(key)); \
|
||||||
if (index != -1) { \
|
if (index != -1) { \
|
||||||
hm->data[index].deleted = true; \
|
hm->data[index].deleted = true; \
|
||||||
|
|||||||
+1
-1
@@ -45,7 +45,7 @@ struct Profiler {
|
|||||||
|
|
||||||
char file_name[100];
|
char file_name[100];
|
||||||
sprintf(file_name, file_template, thread_id);
|
sprintf(file_name, file_template, thread_id);
|
||||||
printf("Hello I am %zd\n", thread_id);
|
// printf("Hello I am %zd\n", thread_id);
|
||||||
out_file = fopen(file_name, "w");
|
out_file = fopen(file_name, "w");
|
||||||
if (!out_file) {
|
if (!out_file) {
|
||||||
printf("could not open %s\n", file_name);
|
printf("could not open %s\n", file_name);
|
||||||
|
|||||||
Reference in New Issue
Block a user