//function : TColStd_intMapNode_findNext
//purpose :
//=======================================================================
-Standard_Integer TColStd_PackedMapOfInteger::TColStd_intMapNode_findNext (const TColStd_intMapNode* theNode,
- unsigned int& theMask)
+Standard_Integer TColStd_PackedMapOfInteger::TColStd_intMapNode_findNext (const Standard_Address theNode,
+ unsigned int& theMask)
{
- unsigned int val = theNode->Data() & theMask;
+ const TColStd_intMapNode* aNode = reinterpret_cast<const TColStd_intMapNode*> (theNode);
+ unsigned int val = aNode->Data() & theMask;
int nZeros (0);
if (val == 0)
theMask = ~0U; // void, nothing to do
}
theMask = (aMask << 1);
}
- return nZeros + theNode->Key();
+ return nZeros + aNode->Key();
}
//=======================================================================
//function : TColStd_intMapNode_findPrev
//purpose :
//=======================================================================
-Standard_Integer TColStd_PackedMapOfInteger::TColStd_intMapNode_findPrev (const TColStd_intMapNode* theNode,
- unsigned int& theMask)
+Standard_Integer TColStd_PackedMapOfInteger::TColStd_intMapNode_findPrev (const Standard_Address theNode,
+ unsigned int& theMask)
{
- unsigned int val = theNode->Data() & theMask;
+ const TColStd_intMapNode* aNode = reinterpret_cast<const TColStd_intMapNode*> (theNode);
+ unsigned int val = aNode->Data() & theMask;
int nZeros (0);
if (val == 0)
theMask = ~0U; // void, nothing to do
}
theMask = (aMask >> 1);
}
- return (31 - nZeros) + theNode->Key();
+ return (31 - nZeros) + aNode->Key();
}
//=======================================================================
}
if (pFoundNode) {
unsigned int aFullMask (0xffffffff);
- aResult = TColStd_intMapNode_findNext (pFoundNode, aFullMask);
+ aResult = TColStd_intMapNode_findNext ((const Standard_Address )pFoundNode, aFullMask);
}
}
return aResult;
}
if (pFoundNode) {
unsigned int aFullMask (0xffffffff);
- aResult = TColStd_intMapNode_findPrev (pFoundNode, aFullMask);
+ aResult = TColStd_intMapNode_findPrev ((const Standard_Address )pFoundNode, aFullMask);
}
}
return aResult;
: TCollection_BasicMapIterator (theMap),
myIntMask (~0U)
{
- myKey = myNode != NULL ? TColStd_intMapNode_findNext (reinterpret_cast<const TColStd_intMapNode*>(myNode), myIntMask) : 0;
+ myKey = myNode != NULL ? TColStd_intMapNode_findNext (myNode, myIntMask) : 0;
}
//! Re-initialize with the same or another Map instance.
{
TCollection_BasicMapIterator::Initialize (theMap);
myIntMask = ~0U;
- myKey = myNode != NULL ? TColStd_intMapNode_findNext (reinterpret_cast<const TColStd_intMapNode*>(myNode), myIntMask) : 0;
+ myKey = myNode != NULL ? TColStd_intMapNode_findNext (myNode, myIntMask) : 0;
}
//! Restart the iteration
{
TCollection_BasicMapIterator::Reset();
myIntMask = ~0U;
- myKey = myNode != NULL ? TColStd_intMapNode_findNext (reinterpret_cast<const TColStd_intMapNode*>(myNode), myIntMask) : 0;
+ myKey = myNode != NULL ? TColStd_intMapNode_findNext (myNode, myIntMask) : 0;
}
//! Query the iterated key.
{
for (; myNode != NULL; TCollection_BasicMapIterator::Next())
{
- const TColStd_intMapNode* aNode = reinterpret_cast<const TColStd_intMapNode*>(myNode);
- myKey = TColStd_intMapNode_findNext (aNode, myIntMask);
+ myKey = TColStd_intMapNode_findNext (myNode, myIntMask);
if (myIntMask != ~0u)
{
break;
//! Find the smallest non-zero bit under the given mask.
//! Outputs the new mask that does not contain the detected bit.
- Standard_EXPORT static Standard_Integer TColStd_intMapNode_findNext (const TColStd_intMapNode* theNode,
+ Standard_EXPORT static Standard_Integer TColStd_intMapNode_findNext (const Standard_Address theNode,
unsigned int& theMask);
//! Find the highest non-zero bit under the given mask.
//! Outputs the new mask that does not contain the detected bit.
- Standard_EXPORT static Standard_Integer TColStd_intMapNode_findPrev (const TColStd_intMapNode* theNode,
+ Standard_EXPORT static Standard_Integer TColStd_intMapNode_findPrev (const Standard_Address theNode,
unsigned int& theMask);
private: