Remove redundant checks for NULL before calling delete
This commit is contained in:
@@ -1213,7 +1213,7 @@ public:
|
||||
const wxIcon &GetIcon() const
|
||||
{ return m_icon; }
|
||||
void SetData( wxClientData *data )
|
||||
{ if (m_data) delete m_data; m_data = data; }
|
||||
{ delete m_data; m_data = data; }
|
||||
wxClientData *GetData() const
|
||||
{ return m_data; }
|
||||
|
||||
|
@@ -144,7 +144,7 @@ public:
|
||||
wxDataObject *GetDataObject() const
|
||||
{ return m_dataObject; }
|
||||
void SetDataObject(wxDataObject *dataObject)
|
||||
{ if (m_dataObject) delete m_dataObject;
|
||||
{ delete m_dataObject;
|
||||
m_dataObject = dataObject; }
|
||||
|
||||
// these functions are called when data is moved over position (x, y) and
|
||||
|
@@ -53,7 +53,7 @@ class WXDLLIMPEXP_BASE wxEncodingConverter : public wxObject
|
||||
public:
|
||||
|
||||
wxEncodingConverter();
|
||||
virtual ~wxEncodingConverter() { if (m_Table) delete[] m_Table; }
|
||||
virtual ~wxEncodingConverter() { delete[] m_Table; }
|
||||
|
||||
// Initialize conversion. Both output or input encoding may
|
||||
// be wxFONTENCODING_UNICODE.
|
||||
|
Reference in New Issue
Block a user