mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Enable readability-const-return-type, readability-container-data-pointer, readability-delete-null-pointer
This commit is contained in:
parent
653c7715a5
commit
bcb50c1b29
|
@ -37,7 +37,10 @@ Checks: >
|
|||
-misc-unused-parameters,
|
||||
modernize-loop-convert,
|
||||
readability-avoid-const-params-in-decls,
|
||||
readability-const-return-type,
|
||||
readability-container-data-pointer,
|
||||
readability-qualified-auto,
|
||||
readability-delete-null-pointer,
|
||||
performance-*,
|
||||
-performance-no-int-to-ptr,
|
||||
HeaderFilterRegex: 'src/.*'
|
||||
|
|
|
@ -322,19 +322,11 @@ bool CMapLayers::STileLayerVisuals::Init(unsigned int Width, unsigned int Height
|
|||
|
||||
CMapLayers::STileLayerVisuals::~STileLayerVisuals()
|
||||
{
|
||||
if(m_TilesOfLayer)
|
||||
{
|
||||
delete[] m_TilesOfLayer;
|
||||
}
|
||||
|
||||
if(m_BorderTop)
|
||||
delete[] m_BorderTop;
|
||||
if(m_BorderBottom)
|
||||
delete[] m_BorderBottom;
|
||||
if(m_BorderLeft)
|
||||
delete[] m_BorderLeft;
|
||||
if(m_BorderRight)
|
||||
delete[] m_BorderRight;
|
||||
delete[] m_TilesOfLayer;
|
||||
delete[] m_BorderTop;
|
||||
delete[] m_BorderBottom;
|
||||
delete[] m_BorderLeft;
|
||||
delete[] m_BorderRight;
|
||||
|
||||
m_TilesOfLayer = NULL;
|
||||
m_BorderTop = NULL;
|
||||
|
|
|
@ -566,10 +566,8 @@ void CCollision::MoveBox(vec2 *pInoutPos, vec2 *pInoutVel, vec2 Size, float Elas
|
|||
|
||||
void CCollision::Dest()
|
||||
{
|
||||
if(m_pDoor)
|
||||
delete[] m_pDoor;
|
||||
if(m_pSwitchers)
|
||||
delete[] m_pSwitchers;
|
||||
delete[] m_pDoor;
|
||||
delete[] m_pSwitchers;
|
||||
m_pTiles = 0;
|
||||
m_Width = 0;
|
||||
m_Height = 0;
|
||||
|
|
|
@ -430,10 +430,8 @@ CSaveTeam::CSaveTeam(IGameController *Controller)
|
|||
|
||||
CSaveTeam::~CSaveTeam()
|
||||
{
|
||||
if(m_pSwitchers)
|
||||
delete[] m_pSwitchers;
|
||||
if(m_pSavedTees)
|
||||
delete[] m_pSavedTees;
|
||||
delete[] m_pSwitchers;
|
||||
delete[] m_pSavedTees;
|
||||
}
|
||||
|
||||
int CSaveTeam::Save(int Team)
|
||||
|
|
Loading…
Reference in a new issue