1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-21 12:49:10 +00:00

Remove a bunch of unused pnUtils stuff.

This commit is contained in:
Darryl Pogue
2012-02-19 12:27:50 -08:00
parent 9137df7763
commit 62d1213853
11 changed files with 8 additions and 1060 deletions

View File

@ -437,8 +437,14 @@ void TBaseHashTable<T>::SetLinkOffset (int linkOffset, unsigned maxSize) {
m_linkOffset = linkOffset;
m_fullList.SetLinkOffset(m_linkOffset + offsetof(THashLink<T>, m_linkToFull));
if (!m_slotMask)
SetSlotCount(max(kSlotMinCount, MathNextPow2(maxSize)));
if (!m_slotMask) {
// http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2
uint32_t v = maxSize - 1;
v |= v >> 1; v |= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16;
v++;
SetSlotCount(max(kSlotMinCount, v));
}
}
//===========================================================================