[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:
Machiavelli 2012-08-03 14:29:04 +02:00 committed by stfx
parent 4a684fe630
commit 21a3ee9267
28 changed files with 80 additions and 160 deletions

View file

@ -36,7 +36,7 @@ void SQLStorage::EraseEntry(uint32 id)
case FT_STRING:
{
if (pIndex[id])
delete [] *(char**)((char*)(pIndex[id]) + offset);
delete[] *(char**)((char*)(pIndex[id]) + offset);
offset += sizeof(char*);
break;
@ -81,7 +81,7 @@ void SQLStorage::Free()
{
for (uint32 y = 0; y < MaxEntry; ++y)
if (pIndex[y])
delete [] *(char**)((char*)(pIndex[y]) + offset);
delete[] *(char**)((char*)(pIndex[y]) + offset);
offset += sizeof(char*);
break;
@ -104,8 +104,8 @@ void SQLStorage::Free()
}
}
delete [] pIndex;
delete [] data;
delete[] pIndex;
delete[] data;
}
void SQLStorage::Load()