mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +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:
@@ -1077,7 +1077,7 @@ void FSD_BinaryFile::ReadString(TCollection_AsciiString& aString)
|
||||
if (!fread(c,size,1,myStream)) Storage_StreamWriteError::Raise();
|
||||
c[size] = '\0';
|
||||
aString = c;
|
||||
Standard::Free((Standard_Address&)c);
|
||||
Standard::Free(c);
|
||||
}
|
||||
else {
|
||||
aString.Clear();
|
||||
@@ -1138,7 +1138,7 @@ void FSD_BinaryFile::ReadExtendedString(TCollection_ExtendedString& aString)
|
||||
c[i] = InverseExtChar (c[i]);
|
||||
#endif
|
||||
aString = c;
|
||||
Standard::Free((Standard_Address&)c);
|
||||
Standard::Free(c);
|
||||
}
|
||||
else {
|
||||
aString.Clear();
|
||||
|
Reference in New Issue
Block a user