mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Remove unnecessary delete statements
If a value is null, the C++ delete statement will do nothing, so there is bo need to explicitly check if the value is null.
This commit is contained in:
parent
7f726ef9ba
commit
e76becf4c6
12 changed files with 22 additions and 41 deletions
|
@ -925,11 +925,8 @@ void BfContext::RebuildType(BfType* type, bool deleteOnDemandTypes, bool rebuild
|
|||
}
|
||||
else
|
||||
{
|
||||
if (typeInst->mHotTypeData != NULL)
|
||||
{
|
||||
delete typeInst->mHotTypeData;
|
||||
typeInst->mHotTypeData = NULL;
|
||||
}
|
||||
delete typeInst->mHotTypeData;
|
||||
typeInst->mHotTypeData = NULL;
|
||||
}
|
||||
|
||||
auto typeDef = typeInst->mTypeDef;
|
||||
|
@ -1009,12 +1006,9 @@ void BfContext::RebuildType(BfType* type, bool deleteOnDemandTypes, bool rebuild
|
|||
typeInst->mTypeWarned = false;
|
||||
typeInst->mIsSplattable = false;
|
||||
typeInst->mHasPackingHoles = false;
|
||||
typeInst->mWantsGCMarking = false;
|
||||
if (typeInst->mTypeInfoEx != NULL)
|
||||
{
|
||||
delete typeInst->mTypeInfoEx;
|
||||
typeInst->mTypeInfoEx = NULL;
|
||||
}
|
||||
typeInst->mWantsGCMarking = false;
|
||||
delete typeInst->mTypeInfoEx;
|
||||
typeInst->mTypeInfoEx = NULL;
|
||||
|
||||
if (typeInst->IsGenericTypeInstance())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue