Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoDutertre committed May 20, 2020
1 parent ced39af commit 49f89bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/utils/vector_hash_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ void init_vector_hmap(vector_hmap_t *hmap, uint32_t n) {
}
hmap->data = tmp;
hmap->size = n;
hmap->nelems = 0;
hmap->resize_threshold = (uint32_t) (n * VECTOR_HMAP_RESIZE_RATIO);
}

Expand Down
6 changes: 1 addition & 5 deletions src/utils/vector_hash_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ typedef struct vhmap_vector_s {


/*
* Default and max sizes of an vector
* Default and max sizes of a vector
*/
#define DEF_VHMAP_VECTOR_SIZE 10
#define MAX_VHMAP_VECTOR_SIZE ((uint32_t)((UINT32_MAX-sizeof(vhmap_vector_t))/sizeof(int32_t)))
Expand Down Expand Up @@ -73,26 +73,22 @@ typedef struct vector_hmap_s {
*/
extern void init_vector_hmap(vector_hmap_t *hmap, uint32_t n);


/*
* Empty the table
*/
extern void reset_vector_hmap(vector_hmap_t *hmap);


/*
* Delete: free memory
*/
extern void delete_vector_hmap(vector_hmap_t *hmap);


/*
* Get the vector of key k
* - return NULL if there's no vector of key k
*/
extern vhmap_vector_t *vector_hmap_find(const vector_hmap_t *hmap, int32_t k);


/*
* Add element x to the vector of key k
* - this creates a new vector if k is not already in the table.
Expand Down

0 comments on commit 49f89bf

Please sign in to comment.