Commit ab2dfec2 by Alan Mishchenko

Improvements to LMS code.

parent 94d722c5
......@@ -342,14 +342,13 @@ static int Vec_MemHashInsert( Vec_Mem_t * p, word * pEntry )
if ( p->nEntries > Vec_IntSize(p->vTable) )
Vec_MemHashResize( p );
pSpot = Vec_MemHashLookup( p, pEntry );
if ( *pSpot == -1 )
{
*pSpot = Vec_IntSize(p->vNexts);
Vec_IntPush( p->vNexts, -1 );
Vec_MemPush( p, pEntry );
assert( p->nEntries == Vec_IntSize(p->vNexts) );
}
return *pSpot;
if ( *pSpot != -1 )
return *pSpot;
*pSpot = Vec_IntSize(p->vNexts);
Vec_IntPush( p->vNexts, -1 );
Vec_MemPush( p, pEntry );
assert( p->nEntries == Vec_IntSize(p->vNexts) );
return Vec_IntSize(p->vNexts) - 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment