Delete a document/object id from the bitmap
| Return Type | Function name | Arguments |
|---|---|---|
| hzEcode | hzIntset::Delete | (uint32_t,) |
Declared in file: hzIntset.h
Defined in file : hzIntset.cpp
Function Logic:
Function body:
hzEcode hzIntset::Delete (uint32_t nId)
{
// Delete a document/object id from the bitmap
//
// Argument: nId The document/object id
//
// Returns: E_NOTFOUND If the document/object id was not in the bitmap
// E_OK If it was and now isn't
_hzfunc("hzIntset::Delete") ;
_idsNode* pNode ; // Target segment
int32_t rv ; // Count of number added (1)
if (!mx) return E_NOTFOUND ;
if (!mx->m_pData) return E_NOTFOUND ;
pNode = _findNode(nId) ;
if (!pNode)
return E_NOTFOUND ;
rv = pNode->Delete(nId) ;
if (rv == 1)
mx->m_nPop -= 1;
// Check if node needs to merge
return E_OK ;
}