mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[12079] Remove some redundant explicit NULL checks for pointers before delete or delete[] calls since this check is done implicitly when deleting
Signed-off-by: stfx <stfx@hotmail.de>
This commit is contained in:
parent
4a684fe630
commit
21a3ee9267
28 changed files with 80 additions and 160 deletions
|
|
@ -169,11 +169,7 @@ uint8* BigNumber::AsByteArray(int minSize, bool reverse)
|
|||
{
|
||||
int length = (minSize >= GetNumBytes()) ? minSize : GetNumBytes();
|
||||
|
||||
if (_array)
|
||||
{
|
||||
delete[] _array;
|
||||
_array = NULL;
|
||||
}
|
||||
delete[] _array;
|
||||
_array = new uint8[length];
|
||||
|
||||
// If we need more bytes than length of BigNumber set the rest to 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue