add suggestions
This commit is contained in:
parent
e6165f3af8
commit
34d2d97c82
6 changed files with 177 additions and 15 deletions
|
@ -27,7 +27,7 @@ int load_elements(hashmap *m, char *table, int use_inv) {
|
|||
|
||||
did_something = 1;
|
||||
|
||||
if (use_inv) {
|
||||
if (use_inv == 1) {
|
||||
hashmap_set(m, str, strlen(str) - 1, (uintptr_t)1, 0);
|
||||
continue;
|
||||
}
|
||||
|
@ -36,6 +36,11 @@ int load_elements(hashmap *m, char *table, int use_inv) {
|
|||
combo[0] = '\0';
|
||||
combo++;
|
||||
|
||||
if (use_inv == 2) {
|
||||
hashmap_set(m, str, strlen(str) - 1, (uintptr_t)combo, 0);
|
||||
continue;
|
||||
}
|
||||
|
||||
hashmap_set(m, combo, strlen(combo) - 1, (uintptr_t)str, 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue