Thanks to visit codestin.com
Credit goes to github.com

Skip to content

st.c: Removed unused set_add_direct_with_hash function #13208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions st.c
Original file line number Diff line number Diff line change
Expand Up @@ -2921,30 +2921,6 @@ set_insert(set_table *tab, st_data_t key)
return 1;
}

/* Insert (KEY, HASH) into table TAB. The table should not have
entry with KEY before the insertion. */
static inline void
set_add_direct_with_hash(set_table *tab,
st_data_t key, st_hash_t hash)
{
set_table_entry *entry;
st_index_t ind;
st_index_t bin_ind;

assert(hash != RESERVED_HASH_VAL);

set_rebuild_table_if_necessary(tab);
ind = tab->entries_bound++;
entry = &tab->entries[ind];
entry->hash = hash;
entry->key = key;
tab->num_entries++;
if (tab->bins != NULL) {
bin_ind = set_find_table_bin_ind_direct(tab, hash, key);
set_bin(tab->bins, set_get_size_ind(tab), bin_ind, ind + ENTRY_BASE);
}
}

/* Create a copy of old_tab into new_tab. */
static set_table *
set_replace(set_table *new_tab, set_table *old_tab)
Expand Down
Loading