parent
d584150851
commit
7493f19cda
|
@ -38,14 +38,14 @@
|
|||
#define wxCHECKED_DELETE(ptr) \
|
||||
wxPRE_NO_WARNING_SCOPE(scope_var1) \
|
||||
{ \
|
||||
typedef char complete[sizeof(*ptr)]; \
|
||||
typedef char complete[sizeof(*ptr)] WX_ATTRIBUTE_UNUSED; \
|
||||
delete ptr; \
|
||||
} wxPOST_NO_WARNING_SCOPE(scope_var1)
|
||||
|
||||
#define wxCHECKED_DELETE_ARRAY(ptr) \
|
||||
wxPRE_NO_WARNING_SCOPE(scope_var2) \
|
||||
{ \
|
||||
typedef char complete[sizeof(*ptr)]; \
|
||||
typedef char complete[sizeof(*ptr)] WX_ATTRIBUTE_UNUSED; \
|
||||
delete [] ptr; \
|
||||
} wxPOST_NO_WARNING_SCOPE(scope_var2)
|
||||
|
||||
|
|
|
@ -577,6 +577,14 @@ typedef short int WXTYPE;
|
|||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define WX_ATTRIBUTE_UNUSED __attribute__ ((unused))
|
||||
#else
|
||||
#define WX_ATTRIBUTE_UNUSED
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
// everybody gets the assert and other debug macros
|
||||
|
@ -586,7 +594,7 @@ typedef short int WXTYPE;
|
|||
template <typename T>
|
||||
inline void wxDELETE(T*& ptr)
|
||||
{
|
||||
typedef char TypeIsCompleteCheck[sizeof(T)];
|
||||
typedef char TypeIsCompleteCheck[sizeof(T)] WX_ATTRIBUTE_UNUSED;
|
||||
|
||||
if ( ptr != NULL )
|
||||
{
|
||||
|
@ -599,7 +607,7 @@ typedef short int WXTYPE;
|
|||
template <typename T>
|
||||
inline void wxDELETEA(T*& ptr)
|
||||
{
|
||||
typedef char TypeIsCompleteCheck[sizeof(T)];
|
||||
typedef char TypeIsCompleteCheck[sizeof(T)] WX_ATTRIBUTE_UNUSED;
|
||||
|
||||
if ( ptr != NULL )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue