Bug fix and new procedures.

This commit is contained in:
Alan Mishchenko 2021-11-02 20:31:32 -07:00
parent a80a91e45f
commit 18b4e8beef
1 changed files with 4 additions and 4 deletions

View File

@ -1953,9 +1953,9 @@ static inline void Vec_IntTwoMerge1( Vec_Int_t * vArr1, Vec_Int_t * vArr2 )
if ( *pBeg1 == *pBeg2 ) if ( *pBeg1 == *pBeg2 )
*pBeg++ = *pBeg1++, pBeg2++; *pBeg++ = *pBeg1++, pBeg2++;
else if ( *pBeg1 < *pBeg2 ) else if ( *pBeg1 < *pBeg2 )
*pBeg1++; pBeg1++;
else else
*pBeg2++; pBeg2++;
} }
assert( vArr1->nSize >= pBeg - vArr1->pArray ); assert( vArr1->nSize >= pBeg - vArr1->pArray );
vArr1->nSize = pBeg - vArr1->pArray; vArr1->nSize = pBeg - vArr1->pArray;
@ -1982,11 +1982,11 @@ static inline void Vec_IntTwoRemove1( Vec_Int_t * vArr1, Vec_Int_t * vArr2 )
while ( pBeg1 < pEnd1 && pBeg2 < pEnd2 ) while ( pBeg1 < pEnd1 && pBeg2 < pEnd2 )
{ {
if ( *pBeg1 == *pBeg2 ) if ( *pBeg1 == *pBeg2 )
*pBeg1++, pBeg2++; pBeg1++, pBeg2++;
else if ( *pBeg1 < *pBeg2 ) else if ( *pBeg1 < *pBeg2 )
*pBeg++ = *pBeg1++; *pBeg++ = *pBeg1++;
else else
*pBeg2++; pBeg2++;
} }
while ( pBeg1 < pEnd1 ) while ( pBeg1 < pEnd1 )
*pBeg++ = *pBeg1++; *pBeg++ = *pBeg1++;