mirror of
https://github.com/thunderbrewhq/squall.git
synced 2026-02-04 08:59:07 +00:00
chore(hash): tidy up TSHashTable::Initialize implementation
This commit is contained in:
parent
048dab15cd
commit
ee6e381c6e
1 changed files with 5 additions and 9 deletions
|
|
@ -94,17 +94,13 @@ T* TSHashTable<T, TKey>::Head() {
|
|||
template <class T, class TKey>
|
||||
void TSHashTable<T, TKey>::Initialize() {
|
||||
this->m_slotmask = 3;
|
||||
this->m_slotlistarray.SetCount(4);
|
||||
this->m_slotlistarray.SetCount(this->m_slotmask + 1);
|
||||
|
||||
int32_t linkOfs = this->GetLinkOffset();
|
||||
uint32_t v3 = 0;
|
||||
STORM_EXPLICIT_LIST(T, m_linktoslot)* v4;
|
||||
auto linkOffset = this->GetLinkOffset();
|
||||
|
||||
do {
|
||||
v4 = &this->m_slotlistarray[v3];
|
||||
v4->ChangeLinkOffset(linkOfs);
|
||||
++v3;
|
||||
} while (v3 < this->m_slotmask);
|
||||
for (uint32_t slot = 0; slot <= this->m_slotmask; slot++) {
|
||||
this->m_slotlistarray[slot].ChangeLinkOffset(linkOffset);
|
||||
}
|
||||
}
|
||||
|
||||
template <class T, class TKey>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue