don't use annoying and unneeded in C++ casts of NULL to "T *" in all other files neither
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -145,7 +145,7 @@ DECLARE_VARIANT_OBJECT_EXPORTED(wxColourPropertyValue, WXDLLIMPEXP_PROPGRID)
|
||||
#endif
|
||||
|
||||
#ifndef SWIG
|
||||
#define wxPG_EMPTY_CPV (*((wxColourPropertyValue*)NULL))
|
||||
#define wxPG_EMPTY_CPV (*(NULL))
|
||||
#define wxPG_NORMAL_FONT (*wxNORMAL_FONT)
|
||||
#else
|
||||
#define wxPG_EMPTY_CPV wxCPV_wxPG_EMPTY
|
||||
|
||||
@@ -214,7 +214,7 @@ wxString CLASSNAME::GetName() const \
|
||||
{ \
|
||||
return wxS(#EDITOR); \
|
||||
} \
|
||||
wxPGEditor* wxPGEditor_##EDITOR = (wxPGEditor*) NULL;
|
||||
wxPGEditor* wxPGEditor_##EDITOR = NULL;
|
||||
|
||||
|
||||
//
|
||||
@@ -434,7 +434,7 @@ public:
|
||||
// Editor class registeration macro (mostly for internal use)
|
||||
|
||||
#define wxPGRegisterEditorClass(EDITOR) \
|
||||
if ( wxPGEditor_##EDITOR == (wxPGEditor*) NULL ) \
|
||||
if ( wxPGEditor_##EDITOR == NULL ) \
|
||||
{ \
|
||||
wxPGEditor_##EDITOR = wxPropertyGrid::RegisterEditorClass( \
|
||||
new wxPG##EDITOR##Editor ); \
|
||||
|
||||
@@ -1926,15 +1926,15 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_PROPGRID, wxEVT_PG_DOUBLE_CLICK, wxPropert
|
||||
#ifndef SWIG
|
||||
typedef void (wxEvtHandler::*wxPropertyGridEventFunction)(wxPropertyGridEvent&);
|
||||
|
||||
#define EVT_PG_SELECTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_SELECTED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), (wxObject *) NULL ),
|
||||
#define EVT_PG_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_CHANGING, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), (wxObject *) NULL ),
|
||||
#define EVT_PG_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_CHANGED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), (wxObject *) NULL ),
|
||||
#define EVT_PG_HIGHLIGHTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_HIGHLIGHTED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), (wxObject *) NULL ),
|
||||
#define EVT_PG_RIGHT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_RIGHT_CLICK, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), (wxObject *) NULL ),
|
||||
#define EVT_PG_DOUBLE_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_DOUBLE_CLICK, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), (wxObject *) NULL ),
|
||||
#define EVT_PG_PAGE_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_PAGE_CHANGED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), (wxObject *) NULL ),
|
||||
#define EVT_PG_ITEM_COLLAPSED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_ITEM_COLLAPSED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), (wxObject *) NULL ),
|
||||
#define EVT_PG_ITEM_EXPANDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_ITEM_EXPANDED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), (wxObject *) NULL ),
|
||||
#define EVT_PG_SELECTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_SELECTED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_CHANGING, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_CHANGED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_HIGHLIGHTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_HIGHLIGHTED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_RIGHT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_RIGHT_CLICK, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_DOUBLE_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_DOUBLE_CLICK, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_PAGE_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_PAGE_CHANGED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_ITEM_COLLAPSED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_ITEM_COLLAPSED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
#define EVT_PG_ITEM_EXPANDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PG_ITEM_EXPANDED, id, -1, wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn ), NULL ),
|
||||
|
||||
#define wxPropertyGridEventHandler(fn) \
|
||||
wxEVENT_HANDLER_CAST( wxPropertyGridEventFunction, fn )
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
/** This constructor is required for NULL. */
|
||||
wxPGPropArgCls( int )
|
||||
{
|
||||
m_ptr.property = (wxPGProperty*) NULL;
|
||||
m_ptr.property = NULL;
|
||||
m_flags = IsProperty;
|
||||
}
|
||||
wxPGProperty* GetPtr( wxPropertyGridInterface* iface ) const;
|
||||
|
||||
@@ -41,7 +41,7 @@ WX_PG_IMPLEMENT_PROPERTY_CLASS_PLAIN(NAME, T, EDITOR)
|
||||
//
|
||||
// These macros help creating DoGetValidator
|
||||
#define WX_PG_DOGETVALIDATOR_ENTRY() \
|
||||
static wxValidator* s_ptr = (wxValidator*) NULL; \
|
||||
static wxValidator* s_ptr = NULL; \
|
||||
if ( s_ptr ) return s_ptr;
|
||||
|
||||
// Common function exit
|
||||
@@ -850,7 +850,7 @@ WX_PG_IMPLEMENT_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAME, \
|
||||
DELIMCHAR, \
|
||||
CUSTBUTTXT) \
|
||||
wxValidator* PROPNAME::DoGetValidator () const \
|
||||
{ return (wxValidator*) NULL; }
|
||||
{ return NULL; }
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
@@ -907,7 +907,7 @@ public:
|
||||
*/
|
||||
virtual wxValidator* GetTextCtrlValidator() const
|
||||
{
|
||||
return (wxValidator*) NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Returns true if array was actually modified
|
||||
|
||||
Reference in New Issue
Block a user