mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0024489: Avoid type casts in call to Standard::Free()
Method Standard::Free() is converted to template, so that pointer is nullified using its proper type. Unnecessary type cases in calls to Standard::Free(), Standard::Reallocate(), and NCollection_BaseAllocator::Free() eliminated throughout OCCT code.
This commit is contained in:
@@ -174,7 +174,7 @@ void TopExp_Explorer::Next()
|
||||
new (&newStack[i]) TopoDS_Iterator(myStack[i]);
|
||||
myStack[i].~TopoDS_Iterator();
|
||||
}
|
||||
Standard::Free((Standard_Address&)myStack);
|
||||
Standard::Free(myStack);
|
||||
mySizeOfStack = NewSize;
|
||||
myStack = newStack;
|
||||
}
|
||||
@@ -200,7 +200,7 @@ void TopExp_Explorer::Next()
|
||||
new (&newStack[i]) TopoDS_Iterator(myStack[i]);
|
||||
myStack[i].~TopoDS_Iterator();
|
||||
}
|
||||
Standard::Free((Standard_Address&)myStack);
|
||||
Standard::Free(myStack);
|
||||
mySizeOfStack = NewSize;
|
||||
myStack = newStack;
|
||||
}
|
||||
@@ -239,7 +239,7 @@ void TopExp_Explorer::Destroy()
|
||||
if (myStack)
|
||||
{
|
||||
for(int i=0;i<= myTop; i++)myStack[i].~TopoDS_Iterator();
|
||||
Standard::Free((Standard_Address&)myStack);
|
||||
Standard::Free(myStack);
|
||||
}
|
||||
mySizeOfStack = 0;
|
||||
myStack = 0L;
|
||||
|
Reference in New Issue
Block a user