Procházet zdrojové kódy

Hashmaps now forward declare the necessary methods

banana-cakes
Felix Brendel před 6 roky
rodič
revize
94ad64f6bb
2 změnil soubory, kde provedl 4 přidání a 2 odebrání
  1. +3
    -1
      hashmap.hpp
  2. +1
    -1
      profiler.hpp

+ 3
- 1
hashmap.hpp Zobrazit soubor

@@ -20,6 +20,8 @@


#define define_hash_map(type, name) \
bool hm_objects_match(type,type); \
u32 hm_hash(type); \
\
struct name##_Hash_Map_Cell { \
type original; \
@@ -98,7 +100,7 @@
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)); \
if (index != -1) { \
hm->data[index].deleted = true; \


+ 1
- 1
profiler.hpp Zobrazit soubor

@@ -45,7 +45,7 @@ struct Profiler {

char file_name[100];
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");
if (!out_file) {
printf("could not open %s\n", file_name);


Načítá se…
Zrušit
Uložit