Enable readability-delete-null-pointer clang-tidy check, fix occurrences
#66
This commit is contained in:
parent
00fdb36ab9
commit
3f9f9bf9f8
3 changed files with 3 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
Checks: '-*,readability-implicit-bool-conversion'
|
||||
Checks: '-*,readability-delete-null-pointer,readability-implicit-bool-conversion'
|
||||
CheckOptions:
|
||||
- key: readability-implicit-bool-conversion.AllowPointerConditions
|
||||
value: '1'
|
||||
|
|
|
@ -373,8 +373,7 @@ int CImageLabel::getImageTall()
|
|||
|
||||
void CImageLabel::LoadImage(const char* pImageName)
|
||||
{
|
||||
if (m_pTGA)
|
||||
delete m_pTGA;
|
||||
delete m_pTGA;
|
||||
|
||||
// Load the Image
|
||||
m_pTGA = LoadTGAForRes(pImageName);
|
||||
|
|
|
@ -493,10 +493,7 @@ void CWorld::Precache()
|
|||
CVAR_SET_STRING("room_type", "0"); // clear DSP
|
||||
|
||||
// Set up game rules
|
||||
if (g_pGameRules)
|
||||
{
|
||||
delete g_pGameRules;
|
||||
}
|
||||
delete g_pGameRules;
|
||||
|
||||
g_pGameRules = InstallGameRules();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue