mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-14 20:51:41 +08: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:
@@ -65,7 +65,7 @@ protected:
|
||||
void Deallocate()
|
||||
{
|
||||
if (myPtr != myBuffer)
|
||||
Standard::Free (*(Standard_Address*)&myPtr);
|
||||
Standard::Free (myPtr);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user