1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Fixed multimap support

This commit is contained in:
Brian Fiete 2020-03-15 06:07:21 -07:00
parent d2d48302de
commit 2fdb6ddff6
2 changed files with 18 additions and 9 deletions

View file

@ -119,17 +119,18 @@ public:
{
int_cosize hashCode = (int_cosize)BeefHash<TKey>()(key) & 0x7FFFFFFF;
while ((uintptr)mIdx < (uintptr)mDictionary->mCount)
{
if (mDictionary->mEntries[mIdx].mHashCode < 0)
while (mCurrentIdx >= 0)
{
mCurrentIdx = mDictionary->mEntries[mCurrentIdx].mNext;
if (mCurrentIdx < 0)
break;
mCurrentIdx = mIdx;
mIdx++;
if ((mDictionary->mEntries[mCurrentIdx].mHashCode == hashCode) &&
(mDictionary->mEntries[mCurrentIdx].mKey == key))
((*(TKey*)&mDictionary->mEntries[mCurrentIdx].mKey) == key))
{
mIdx = mCurrentIdx;
return true;
}
}
mIdx = mDictionary->mCount + 1;