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
|
@ -3403,8 +3403,7 @@ BF_EXPORT void BF_CALLTYPE BfParser_SetSource(BfParser* bfParser, const char* da
|
|||
|
||||
BF_EXPORT void BF_CALLTYPE BfParser_SetCharIdData(BfParser* bfParser, uint8* data, int length)
|
||||
{
|
||||
if (bfParser->mParserData->mCharIdData != NULL)
|
||||
delete bfParser->mParserData->mCharIdData;
|
||||
delete bfParser->mParserData->mCharIdData;
|
||||
bfParser->mParserData->mCharIdData = new uint8[length];
|
||||
memcpy(bfParser->mParserData->mCharIdData, data, length);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue