From d3b9f782ef3949f583e8ac53795d36787f044fc3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 19 Jan 2009 13:55:27 +0000 Subject: [PATCH] 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 --- include/wx/aui/tabmdi.h | 8 +-- include/wx/bitmap.h | 2 +- include/wx/caret.h | 2 +- include/wx/clipbrd.h | 2 +- include/wx/cocoa/dataobj2.h | 2 +- include/wx/cocoa/menuitem.h | 4 +- include/wx/colordlg.h | 2 +- include/wx/combo.h | 2 +- include/wx/cshelp.h | 2 +- include/wx/datetime.h | 2 +- include/wx/dfb/bitmap.h | 2 +- include/wx/dfb/window.h | 4 +- include/wx/dnd.h | 4 +- include/wx/docmdi.h | 2 +- include/wx/filefn.h | 4 +- include/wx/fontdlg.h | 2 +- include/wx/generic/colrdlgg.h | 4 +- include/wx/generic/dragimgg.h | 2 +- include/wx/generic/helpext.h | 2 +- include/wx/generic/laywin.h | 6 +-- include/wx/generic/numdlgg.h | 2 +- include/wx/generic/printps.h | 6 +-- include/wx/generic/prntdlgg.h | 2 +- include/wx/generic/splitter.h | 4 +- include/wx/generic/tabg.h | 4 +- include/wx/generic/textdlgg.h | 4 +- include/wx/gtk/bitmap.h | 2 +- include/wx/gtk/choice.h | 2 +- include/wx/gtk/colordlg.h | 4 +- include/wx/gtk/dataobj2.h | 2 +- include/wx/gtk/dcclient.h | 6 +-- include/wx/gtk/dnd.h | 4 +- include/wx/gtk/gnome/gprint.h | 10 ++-- include/wx/gtk/menuitem.h | 4 +- include/wx/gtk/print.h | 10 ++-- include/wx/gtk/window.h | 6 +-- include/wx/gtk1/bitmap.h | 2 +- include/wx/gtk1/choice.h | 6 +-- include/wx/gtk1/colordlg.h | 4 +- include/wx/gtk1/dataobj2.h | 2 +- include/wx/gtk1/dcclient.h | 6 +-- include/wx/gtk1/dnd.h | 4 +- include/wx/gtk1/menuitem.h | 6 +-- include/wx/gtk1/scrolbar.h | 2 +- include/wx/gtk1/window.h | 6 +-- include/wx/helpbase.h | 2 +- include/wx/html/webkit.h | 10 ++-- include/wx/image.h | 2 +- include/wx/log.h | 2 +- include/wx/mediactrl.h | 12 ++--- include/wx/menu.h | 2 +- include/wx/menuitem.h | 10 ++-- include/wx/mgl/bitmap.h | 2 +- include/wx/mgl/window.h | 4 +- include/wx/motif/bmpmotif.h | 2 +- include/wx/motif/menuitem.h | 4 +- include/wx/motif/window.h | 6 +-- include/wx/msw/dragimag.h | 2 +- include/wx/msw/enhmeta.h | 2 +- include/wx/msw/menuitem.h | 4 +- include/wx/msw/ole/activex.h | 2 +- include/wx/msw/ole/automtn.h | 4 +- include/wx/msw/window.h | 6 +-- include/wx/os2/bitmap.h | 6 +-- include/wx/os2/dataobj2.h | 2 +- include/wx/os2/dnd.h | 2 +- include/wx/os2/menuitem.h | 2 +- include/wx/os2/treectrl.h | 2 +- include/wx/os2/window.h | 6 +-- include/wx/osx/dnd.h | 4 +- include/wx/osx/menuitem.h | 4 +- include/wx/osx/treectrl.h | 28 +++++----- include/wx/osx/window.h | 2 +- include/wx/palmos/dragimag.h | 2 +- include/wx/palmos/enhmeta.h | 2 +- include/wx/palmos/glcanvas.h | 8 +-- include/wx/palmos/menuitem.h | 6 +-- include/wx/palmos/pen.h | 6 +-- include/wx/palmos/window.h | 6 +-- include/wx/prntbase.h | 12 ++--- include/wx/process.h | 2 +- include/wx/propgrid/advprops.h | 2 +- include/wx/propgrid/editors.h | 4 +- include/wx/propgrid/propgrid.h | 18 +++---- include/wx/propgrid/propgridiface.h | 2 +- include/wx/propgrid/props.h | 6 +-- include/wx/richtext/richtextbuffer.h | 2 +- include/wx/stc/stc.h | 56 +++++++++---------- include/wx/tbarbase.h | 6 +-- include/wx/thread.h | 2 +- include/wx/univ/choice.h | 2 +- include/wx/univ/menuitem.h | 4 +- include/wx/univ/renderer.h | 12 ++--- include/wx/univ/window.h | 2 +- include/wx/unix/fontutil.h | 2 +- include/wx/utils.h | 8 +-- include/wx/validate.h | 4 +- include/wx/window.h | 8 +-- include/wx/wizard.h | 8 +-- include/wx/x11/bitmap.h | 2 +- include/wx/x11/dataobj2.h | 2 +- include/wx/x11/nanox/X11/Xlib.h | 4 +- include/wx/x11/window.h | 6 +-- include/wx/xti.h | 20 +++---- src/aui/tabmdi.cpp | 2 +- src/cocoa/fontutil.cpp | 4 +- src/common/appbase.cpp | 2 +- src/common/appcmn.cpp | 2 +- src/common/cmdproc.cpp | 4 +- src/common/cmndata.cpp | 4 +- src/common/combocmn.cpp | 32 +++++------ src/common/containr.cpp | 4 +- src/common/cshelp.cpp | 2 +- src/common/dobjcmn.cpp | 4 +- src/common/docmdi.cpp | 10 ++-- src/common/dynarray.cpp | 6 +-- src/common/filefn.cpp | 6 +-- src/common/filesys.cpp | 4 +- src/common/framecmn.cpp | 10 ++-- src/common/fs_inet.cpp | 2 +- src/common/gbsizer.cpp | 24 ++++----- src/common/imagpng.cpp | 2 +- src/common/intl.cpp | 2 +- src/common/layout.cpp | 4 +- src/common/list.cpp | 34 ++++++------ src/common/log.cpp | 2 +- src/common/memory.cpp | 8 +-- src/common/menucmn.cpp | 16 +++--- src/common/object.cpp | 2 +- src/common/paper.cpp | 2 +- src/common/popupcmn.cpp | 6 +-- src/common/prntbase.cpp | 20 +++---- src/common/tbarbase.cpp | 18 +++---- src/common/toplvcmn.cpp | 2 +- src/common/utilscmn.cpp | 2 +- src/common/validate.cpp | 2 +- src/common/variant.cpp | 6 +-- src/common/wincmn.cpp | 34 ++++++------ src/common/wxcrt.cpp | 16 +++--- src/generic/calctrlg.cpp | 2 +- src/generic/dcpsg.cpp | 6 +-- src/generic/dirctrlg.cpp | 2 +- src/generic/dragimgg.cpp | 14 ++--- src/generic/helpext.cpp | 2 +- src/generic/imaglist.cpp | 2 +- src/generic/listctrl.cpp | 30 +++++------ src/generic/logg.cpp | 4 +- src/generic/notebook.cpp | 2 +- src/generic/printps.cpp | 4 +- src/generic/prntdlgg.cpp | 6 +-- src/generic/progdlgg.cpp | 2 +- src/generic/scrlwing.cpp | 2 +- src/generic/splitter.cpp | 14 ++--- src/generic/tabg.cpp | 22 ++++---- src/generic/treectlg.cpp | 14 ++--- src/generic/vscroll.cpp | 2 +- src/generic/wizard.cpp | 2 +- src/gtk/animate.cpp | 2 +- src/gtk/app.cpp | 2 +- src/gtk/bitmap.cpp | 26 ++++----- src/gtk/choice.cpp | 2 +- src/gtk/cursor.cpp | 2 +- src/gtk/dataview.cpp | 2 +- src/gtk/dcclient.cpp | 50 ++++++++--------- src/gtk/dcmemory.cpp | 2 +- src/gtk/dnd.cpp | 26 ++++----- src/gtk/font.cpp | 2 +- src/gtk/listbox.cpp | 6 +-- src/gtk/menu.cpp | 12 ++--- src/gtk/minifram.cpp | 4 +- src/gtk/pen.cpp | 2 +- src/gtk/radiobox.cpp | 4 +- src/gtk/region.cpp | 2 +- src/gtk/scrolbar.cpp | 4 +- src/gtk/slider.cpp | 4 +- src/gtk/tbargtk.cpp | 4 +- src/gtk/tooltip.cpp | 4 +- src/gtk/toplevel.cpp | 6 +-- src/gtk/utilsgtk.cpp | 2 +- src/gtk/window.cpp | 34 ++++++------ src/gtk1/app.cpp | 6 +-- src/gtk1/bitmap.cpp | 44 +++++++-------- src/gtk1/bmpbuttn.cpp | 2 +- src/gtk1/choice.cpp | 18 +++---- src/gtk1/clipbrd.cpp | 12 ++--- src/gtk1/colour.cpp | 6 +-- src/gtk1/combobox.cpp | 10 ++-- src/gtk1/cursor.cpp | 2 +- src/gtk1/dcclient.cpp | 80 ++++++++++++++-------------- src/gtk1/dcmemory.cpp | 2 +- src/gtk1/dcscreen.cpp | 2 +- src/gtk1/dnd.cpp | 26 ++++----- src/gtk1/font.cpp | 6 +-- src/gtk1/frame.cpp | 4 +- src/gtk1/listbox.cpp | 12 ++--- src/gtk1/menu.cpp | 30 +++++------ src/gtk1/minifram.cpp | 8 +-- src/gtk1/notebook.cpp | 16 +++--- src/gtk1/pen.cpp | 2 +- src/gtk1/popupwin.cpp | 2 +- src/gtk1/radiobox.cpp | 6 +-- src/gtk1/radiobut.cpp | 2 +- src/gtk1/region.cpp | 2 +- src/gtk1/renderer.cpp | 2 +- src/gtk1/scrolbar.cpp | 4 +- src/gtk1/slider.cpp | 4 +- src/gtk1/statbmp.cpp | 2 +- src/gtk1/tbargtk.cpp | 12 ++--- src/gtk1/textctrl.cpp | 6 +-- src/gtk1/tglbtn.cpp | 2 +- src/gtk1/tooltip.cpp | 6 +-- src/gtk1/toplevel.cpp | 12 ++--- src/gtk1/utilsgtk.cpp | 2 +- src/gtk1/window.cpp | 60 ++++++++++----------- src/html/helpdata.cpp | 4 +- src/html/helpfrm.cpp | 2 +- src/html/helpwnd.cpp | 2 +- src/mgl/bitmap.cpp | 2 +- src/mgl/cursor.cpp | 2 +- src/mgl/pen.cpp | 2 +- src/motif/accel.cpp | 8 +-- src/motif/bmpmotif.cpp | 4 +- src/motif/checkbox.cpp | 2 +- src/motif/dcclient.cpp | 10 ++-- src/motif/dnd.cpp | 2 +- src/motif/filedlg.cpp | 2 +- src/motif/font.cpp | 6 +-- src/motif/frame.cpp | 2 +- src/motif/menu.cpp | 12 ++--- src/motif/msgdlg.cpp | 2 +- src/motif/radiobut.cpp | 2 +- src/motif/textctrl.cpp | 4 +- src/motif/toolbar.cpp | 6 +-- src/motif/utils.cpp | 2 +- src/motif/window.cpp | 4 +- src/msw/bitmap.cpp | 6 +-- src/msw/combo.cpp | 4 +- src/msw/cursor.cpp | 2 +- src/msw/dde.cpp | 6 +-- src/msw/dragimag.cpp | 4 +- src/msw/mdi.cpp | 2 +- src/msw/ole/automtn.cpp | 8 +-- src/msw/printwin.cpp | 2 +- src/msw/region.cpp | 2 +- src/msw/toolbar.cpp | 2 +- src/msw/toplevel.cpp | 2 +- src/msw/window.cpp | 2 +- src/os2/dcprint.cpp | 6 +-- src/os2/dialog.cpp | 4 +- src/os2/frame.cpp | 2 +- src/os2/gdiimage.cpp | 6 +-- src/os2/toolbar.cpp | 2 +- src/os2/toplevel.cpp | 2 +- src/os2/window.cpp | 2 +- src/osx/carbon/clipbrd.cpp | 2 +- src/osx/carbon/toolbar.cpp | 2 +- src/osx/carbon/tooltip.cpp | 2 +- src/osx/cocoa/toolbar.mm | 2 +- src/osx/cocoa/tooltip.mm | 2 +- src/osx/core/bitmap.cpp | 2 +- src/osx/core/printmac.cpp | 2 +- src/osx/menu_osx.cpp | 6 +-- src/osx/window_osx.cpp | 2 +- src/palmos/bitmap.cpp | 6 +-- src/palmos/choice.cpp | 2 +- src/palmos/dir.cpp | 2 +- src/palmos/enhmeta.cpp | 2 +- src/palmos/listbox.cpp | 2 +- src/palmos/printdlg.cpp | 2 +- src/palmos/printpalm.cpp | 2 +- src/propgrid/advprops.cpp | 4 +- src/propgrid/editors.cpp | 14 ++--- src/propgrid/manager.cpp | 18 +++---- src/propgrid/property.cpp | 14 ++--- src/propgrid/propgrid.cpp | 46 ++++++++-------- src/propgrid/propgridpagestate.cpp | 30 +++++------ src/propgrid/props.cpp | 12 ++--- src/richtext/richtextbuffer.cpp | 2 +- src/univ/combobox.cpp | 2 +- src/univ/textctrl.cpp | 8 +-- src/univ/theme.cpp | 6 +-- src/univ/winuniv.cpp | 2 +- src/unix/dialup.cpp | 4 +- src/unix/dir.cpp | 2 +- src/unix/fontutil.cpp | 4 +- src/unix/sound_sdl.cpp | 2 +- src/unix/threadpsx.cpp | 4 +- src/unix/utilsunx.cpp | 2 +- src/x11/bitmap.cpp | 12 ++--- src/x11/clipbrd.cpp | 12 ++--- src/x11/colour.cpp | 4 +- src/x11/dcclient.cpp | 20 +++---- src/x11/dnd.cpp | 2 +- src/x11/font.cpp | 6 +-- src/x11/palette.cpp | 2 +- src/x11/pen.cpp | 2 +- src/x11/region.cpp | 2 +- 297 files changed, 1003 insertions(+), 1003 deletions(-) diff --git a/include/wx/aui/tabmdi.h b/include/wx/aui/tabmdi.h index 1084829cf0..2da0bdd809 100644 --- a/include/wx/aui/tabmdi.h +++ b/include/wx/aui/tabmdi.h @@ -162,9 +162,9 @@ public: long WXUNUSED(style) = 1, wxWindowID WXUNUSED(winid) = 1, const wxString& WXUNUSED(name) = wxEmptyString) - { return (wxStatusBar*)NULL; } + { return NULL; } - virtual wxStatusBar *GetStatusBar() const { return (wxStatusBar*)NULL; } + virtual wxStatusBar *GetStatusBar() const { return NULL; } virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number)=0 ) {} virtual void SetStatusWidths( int WXUNUSED(n), const int WXUNUSED(widths_field)[] ) {} #endif @@ -174,8 +174,8 @@ public: virtual wxToolBar* CreateToolBar(long WXUNUSED(style), wxWindowID WXUNUSED(winid), const wxString& WXUNUSED(name)) - { return (wxToolBar*)NULL; } - virtual wxToolBar *GetToolBar() const { return (wxToolBar*)NULL; } + { return NULL; } + virtual wxToolBar *GetToolBar() const { return NULL; } #endif diff --git a/include/wx/bitmap.h b/include/wx/bitmap.h index f6fd27635e..22debebe20 100644 --- a/include/wx/bitmap.h +++ b/include/wx/bitmap.h @@ -174,7 +174,7 @@ public: virtual wxBitmap GetSubBitmap(const wxRect& rect) const = 0; virtual bool SaveFile(const wxString &name, wxBitmapType type, - const wxPalette *palette = (wxPalette *)NULL) const = 0; + const wxPalette *palette = NULL) const = 0; virtual bool LoadFile(const wxString &name, wxBitmapType type) = 0; /* diff --git a/include/wx/caret.h b/include/wx/caret.h index e65e9deca1..b89796ff88 100644 --- a/include/wx/caret.h +++ b/include/wx/caret.h @@ -167,7 +167,7 @@ protected: // the common initialization void Init() { - m_window = (wxWindowBase *)NULL; + m_window = NULL; m_x = m_y = 0; m_width = m_height = 0; m_countVisible = 0; diff --git a/include/wx/clipbrd.h b/include/wx/clipbrd.h index 76371170c3..e8b9a900ed 100644 --- a/include/wx/clipbrd.h +++ b/include/wx/clipbrd.h @@ -167,7 +167,7 @@ typedef void (wxEvtHandler::*wxClipboardEventFunction)(wxClipboardEvent&); class WXDLLIMPEXP_CORE wxClipboardLocker { public: - wxClipboardLocker(wxClipboard *clipboard = (wxClipboard *)NULL) + wxClipboardLocker(wxClipboard *clipboard = NULL) { m_clipboard = clipboard ? clipboard : wxTheClipboard; if ( m_clipboard ) diff --git a/include/wx/cocoa/dataobj2.h b/include/wx/cocoa/dataobj2.h index 1c5299fe8d..a1d1ea3e25 100644 --- a/include/wx/cocoa/dataobj2.h +++ b/include/wx/cocoa/dataobj2.h @@ -36,7 +36,7 @@ public: virtual bool SetData(size_t len, const void *buf); protected: - void Init() { m_pngData = (void *)NULL; m_pngSize = 0; } + void Init() { m_pngData = NULL; m_pngSize = 0; } void Clear() { free(m_pngData); } void ClearAll() { Clear(); Init(); } diff --git a/include/wx/cocoa/menuitem.h b/include/wx/cocoa/menuitem.h index 7e185e4144..01e3f51336 100644 --- a/include/wx/cocoa/menuitem.h +++ b/include/wx/cocoa/menuitem.h @@ -31,12 +31,12 @@ public: // ------------------------------------------------------------------------ // initialization // ------------------------------------------------------------------------ - wxMenuItemCocoa(wxMenu *parentMenu = (wxMenu *)NULL, + wxMenuItemCocoa(wxMenu *parentMenu = NULL, int id = wxID_SEPARATOR, const wxString& name = wxEmptyString, const wxString& help = wxEmptyString, wxItemKind kind = wxITEM_NORMAL, - wxMenu *subMenu = (wxMenu *)NULL); + wxMenu *subMenu = NULL); virtual ~wxMenuItemCocoa(); // ------------------------------------------------------------------------ diff --git a/include/wx/colordlg.h b/include/wx/colordlg.h index 7c36c2b1a7..2015970c47 100644 --- a/include/wx/colordlg.h +++ b/include/wx/colordlg.h @@ -33,7 +33,7 @@ class WXDLLIMPEXP_FWD_CORE wxColourData; // get the colour from user and return it -WXDLLIMPEXP_CORE wxColour wxGetColourFromUser(wxWindow *parent = (wxWindow *)NULL, +WXDLLIMPEXP_CORE wxColour wxGetColourFromUser(wxWindow *parent = NULL, const wxColour& colInit = wxNullColour, const wxString& caption = wxEmptyString, wxColourData *data = NULL); diff --git a/include/wx/combo.h b/include/wx/combo.h index 902c0bc5b9..658861ce13 100644 --- a/include/wx/combo.h +++ b/include/wx/combo.h @@ -651,7 +651,7 @@ class WXDLLIMPEXP_CORE wxComboPopup public: wxComboPopup() { - m_combo = (wxComboCtrlBase*) NULL; + m_combo = NULL; m_iFlags = 0; } diff --git a/include/wx/cshelp.h b/include/wx/cshelp.h index a165ab220e..fc9fde211a 100644 --- a/include/wx/cshelp.h +++ b/include/wx/cshelp.h @@ -217,7 +217,7 @@ class WXDLLIMPEXP_CORE wxHelpControllerHelpProvider : public wxSimpleHelpProvide public: // Note that it doesn't own the help controller. The help controller // should be deleted separately. - wxHelpControllerHelpProvider(wxHelpControllerBase* hc = (wxHelpControllerBase*) NULL); + wxHelpControllerHelpProvider(wxHelpControllerBase* hc = NULL); // implement wxHelpProvider methods diff --git a/include/wx/datetime.h b/include/wx/datetime.h index 5942e0cc33..6e4341618a 100644 --- a/include/wx/datetime.h +++ b/include/wx/datetime.h @@ -1270,7 +1270,7 @@ public: inline wxLongLong GetValue() const; // a helper function to get the current time_t - static time_t GetTimeNow() { return time((time_t *)NULL); } + static time_t GetTimeNow() { return time(NULL); } // another one to get the current time broken down static struct tm *GetTmNow() diff --git a/include/wx/dfb/bitmap.h b/include/wx/dfb/bitmap.h index e4c78ff6e9..246582a809 100644 --- a/include/wx/dfb/bitmap.h +++ b/include/wx/dfb/bitmap.h @@ -51,7 +51,7 @@ public: virtual wxBitmap GetSubBitmap(const wxRect& rect) const; virtual bool SaveFile(const wxString &name, wxBitmapType type, - const wxPalette *palette = (wxPalette *) NULL) const; + const wxPalette *palette = NULL) const; virtual bool LoadFile(const wxString &name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); #if wxUSE_PALETTE diff --git a/include/wx/dfb/window.h b/include/wx/dfb/window.h index 89ee39d46f..d70774f9cc 100644 --- a/include/wx/dfb/window.h +++ b/include/wx/dfb/window.h @@ -83,8 +83,8 @@ public: virtual int GetCharWidth() const; virtual void GetTextExtent(const wxString& string, int *x, int *y, - int *descent = (int *) NULL, - int *externalLeading = (int *) NULL, + int *descent = NULL, + int *externalLeading = NULL, const wxFont *theFont = (const wxFont *) NULL) const; diff --git a/include/wx/dnd.h b/include/wx/dnd.h index d1cde3e9cd..bacf91998e 100644 --- a/include/wx/dnd.h +++ b/include/wx/dnd.h @@ -63,7 +63,7 @@ public: : m_cursorCopy(cursorCopy), m_cursorMove(cursorMove), m_cursorStop(cursorStop) - { m_data = (wxDataObject *)NULL; } + { m_data = NULL; } virtual ~wxDropSourceBase() { } // set the data which is transfered by drag and drop @@ -135,7 +135,7 @@ public: // ctor takes a pointer to heap-allocated wxDataObject which will be owned // by wxDropTarget and deleted by it automatically. If you don't give it // here, you can use SetDataObject() later. - wxDropTargetBase(wxDataObject *dataObject = (wxDataObject*)NULL) + wxDropTargetBase(wxDataObject *dataObject = NULL) { m_dataObject = dataObject; m_defaultAction = wxDragNone; } // dtor deletes our data object virtual ~wxDropTargetBase() diff --git a/include/wx/docmdi.h b/include/wx/docmdi.h index 628b685543..828e6a5b6d 100644 --- a/include/wx/docmdi.h +++ b/include/wx/docmdi.h @@ -84,7 +84,7 @@ public: inline wxView *GetView(void) const { return m_childView; } inline void SetDocument(wxDocument *doc) { m_childDocument = doc; } inline void SetView(wxView *view) { m_childView = view; } - bool Destroy() { m_childView = (wxView *)NULL; return wxMDIChildFrame::Destroy(); } + bool Destroy() { m_childView = NULL; return wxMDIChildFrame::Destroy(); } protected: void Init(); diff --git a/include/wx/filefn.h b/include/wx/filefn.h index 3905288843..c64db53235 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -561,7 +561,7 @@ wxDEPRECATED( WXDLLIMPEXP_BASE void wxStripExtension(wxString& buffer) ); // DEPRECATED: construct a wxFileName, use ClearExt() and then GetFullPath() // Get a temporary filename -wxDEPRECATED_BUT_USED_INTERNALLY( WXDLLIMPEXP_BASE wxChar* wxGetTempFileName(const wxString& prefix, wxChar *buf = (wxChar *) NULL) ); +wxDEPRECATED_BUT_USED_INTERNALLY( WXDLLIMPEXP_BASE wxChar* wxGetTempFileName(const wxString& prefix, wxChar *buf = NULL) ); wxDEPRECATED_BUT_USED_INTERNALLY( WXDLLIMPEXP_BASE bool wxGetTempFileName(const wxString& prefix, wxString& buf) ); // Expand file name (~/ and ${OPENWINHOME}/ stuff) @@ -623,7 +623,7 @@ WXDLLIMPEXP_BASE bool wxRenameFile(const wxString& file1, const wxString& file2, // copies into buf. // IMPORTANT NOTE getcwd is know not to work under some releases // of Win32s 1.3, according to MS release notes! -wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* wxGetWorkingDirectory(wxChar *buf = (wxChar *) NULL, int sz = 1000) ); +wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* wxGetWorkingDirectory(wxChar *buf = NULL, int sz = 1000) ); // new and preferred version of wxGetWorkingDirectory // NB: can't have the same name because of overloading ambiguity #endif // WXWIN_COMPATIBILITY_2_6 diff --git a/include/wx/fontdlg.h b/include/wx/fontdlg.h index 2d845d5e3a..5a2dca1195 100644 --- a/include/wx/fontdlg.h +++ b/include/wx/fontdlg.h @@ -108,7 +108,7 @@ inline bool wxFontDialogBase::Create(wxWindow *parent, const wxFontData *data) // get the font from user and return it, returns wxNullFont if the dialog was // cancelled -WXDLLIMPEXP_CORE wxFont wxGetFontFromUser(wxWindow *parent = (wxWindow *)NULL, +WXDLLIMPEXP_CORE wxFont wxGetFontFromUser(wxWindow *parent = NULL, const wxFont& fontInit = wxNullFont, const wxString& caption = wxEmptyString); diff --git a/include/wx/generic/colrdlgg.h b/include/wx/generic/colrdlgg.h index 4db6b82c93..e1b9e4268f 100644 --- a/include/wx/generic/colrdlgg.h +++ b/include/wx/generic/colrdlgg.h @@ -34,10 +34,10 @@ class WXDLLIMPEXP_CORE wxGenericColourDialog : public wxDialog public: wxGenericColourDialog(); wxGenericColourDialog(wxWindow *parent, - wxColourData *data = (wxColourData *) NULL); + wxColourData *data = NULL); virtual ~wxGenericColourDialog(); - bool Create(wxWindow *parent, wxColourData *data = (wxColourData *) NULL); + bool Create(wxWindow *parent, wxColourData *data = NULL); wxColourData &GetColourData() { return m_colourData; } diff --git a/include/wx/generic/dragimgg.h b/include/wx/generic/dragimgg.h index 7c1c72a239..819128fd04 100644 --- a/include/wx/generic/dragimgg.h +++ b/include/wx/generic/dragimgg.h @@ -193,7 +193,7 @@ public: // Begin drag. hotspot is the location of the drag position relative to the upper-left // corner of the image. - bool BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullScreen = false, wxRect* rect = (wxRect*) NULL); + bool BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullScreen = false, wxRect* rect = NULL); // Begin drag. hotspot is the location of the drag position relative to the upper-left // corner of the image. This is full screen only. fullScreenRect gives the diff --git a/include/wx/generic/helpext.h b/include/wx/generic/helpext.h index 080ba94620..9546bfe424 100644 --- a/include/wx/generic/helpext.h +++ b/include/wx/generic/helpext.h @@ -69,7 +69,7 @@ public: wxPoint *WXUNUSED(pos) = NULL, bool *WXUNUSED(newFrameEachTime) = NULL) { - return (wxFrame*) NULL; // does nothing by default + return NULL; // does nothing by default } protected: diff --git a/include/wx/generic/laywin.h b/include/wx/generic/laywin.h index f1dea1d292..2bfae54daf 100644 --- a/include/wx/generic/laywin.h +++ b/include/wx/generic/laywin.h @@ -213,15 +213,15 @@ public: #if wxUSE_MDI_ARCHITECTURE // The MDI client window is sized to whatever's left over. - bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = (wxRect*) NULL); + bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = NULL); #endif // wxUSE_MDI_ARCHITECTURE // mainWindow is sized to whatever's left over. This function for backward // compatibility; use LayoutWindow. - bool LayoutFrame(wxFrame* frame, wxWindow* mainWindow = (wxWindow*) NULL); + bool LayoutFrame(wxFrame* frame, wxWindow* mainWindow = NULL); // mainWindow is sized to whatever's left over. - bool LayoutWindow(wxWindow* frame, wxWindow* mainWindow = (wxWindow*) NULL); + bool LayoutWindow(wxWindow* frame, wxWindow* mainWindow = NULL); }; #endif diff --git a/include/wx/generic/numdlgg.h b/include/wx/generic/numdlgg.h index 1ac15c680f..0ce35fb808 100644 --- a/include/wx/generic/numdlgg.h +++ b/include/wx/generic/numdlgg.h @@ -71,7 +71,7 @@ WXDLLIMPEXP_CORE long long value = 0, long min = 0, long max = 100, - wxWindow *parent = (wxWindow *)NULL, + wxWindow *parent = NULL, const wxPoint& pos = wxDefaultPosition); #endif // wxUSE_NUMBERDLG diff --git a/include/wx/generic/printps.h b/include/wx/generic/printps.h index e2ae6ece3b..aae2d1ed33 100644 --- a/include/wx/generic/printps.h +++ b/include/wx/generic/printps.h @@ -24,7 +24,7 @@ class WXDLLIMPEXP_CORE wxPostScriptPrinter : public wxPrinterBase { public: - wxPostScriptPrinter(wxPrintDialogData *data = (wxPrintDialogData *) NULL); + wxPostScriptPrinter(wxPrintDialogData *data = NULL); virtual ~wxPostScriptPrinter(); virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = true); @@ -44,8 +44,8 @@ class WXDLLIMPEXP_CORE wxPostScriptPrintPreview : public wxPrintPreviewBase { public: wxPostScriptPrintPreview(wxPrintout *printout, - wxPrintout *printoutForPrinting = (wxPrintout *) NULL, - wxPrintDialogData *data = (wxPrintDialogData *) NULL); + wxPrintout *printoutForPrinting = NULL, + wxPrintDialogData *data = NULL); wxPostScriptPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting, wxPrintData *data); diff --git a/include/wx/generic/prntdlgg.h b/include/wx/generic/prntdlgg.h index 6880629ce4..63f8139cc6 100644 --- a/include/wx/generic/prntdlgg.h +++ b/include/wx/generic/prntdlgg.h @@ -141,7 +141,7 @@ class WXDLLIMPEXP_CORE wxGenericPrintDialog : public wxPrintDialogBase { public: wxGenericPrintDialog(wxWindow *parent, - wxPrintDialogData* data = (wxPrintDialogData*)NULL); + wxPrintDialogData* data = NULL); wxGenericPrintDialog(wxWindow *parent, wxPrintData* data); virtual ~wxGenericPrintDialog(); diff --git a/include/wx/generic/splitter.h b/include/wx/generic/splitter.h index a86febee95..b96cf67867 100644 --- a/include/wx/generic/splitter.h +++ b/include/wx/generic/splitter.h @@ -119,7 +119,7 @@ public: // Removes the specified (or second) window from the view // Doesn't actually delete the window. - bool Unsplit(wxWindow *toRemove = (wxWindow *) NULL); + bool Unsplit(wxWindow *toRemove = NULL); // Replaces one of the windows with another one (neither old nor new // parameter should be NULL) @@ -316,7 +316,7 @@ class WXDLLIMPEXP_CORE wxSplitterEvent : public wxNotifyEvent { public: wxSplitterEvent(wxEventType type = wxEVT_NULL, - wxSplitterWindow *splitter = (wxSplitterWindow *)NULL) + wxSplitterWindow *splitter = NULL) : wxNotifyEvent(type) { SetEventObject(splitter); diff --git a/include/wx/generic/tabg.h b/include/wx/generic/tabg.h index b95297e4f4..3899cadd94 100644 --- a/include/wx/generic/tabg.h +++ b/include/wx/generic/tabg.h @@ -31,7 +31,7 @@ class WXDLLIMPEXP_CORE wxTabControl: public wxObject { DECLARE_DYNAMIC_CLASS(wxTabControl) public: - wxTabControl(wxTabView *v = (wxTabView *) NULL); + wxTabControl(wxTabView *v = NULL); virtual ~wxTabControl(void); virtual void OnDraw(wxDC& dc, bool lastInRow); @@ -108,7 +108,7 @@ public: inline wxWindow* GetWindow(void) const { return m_window; } // Automatically positions tabs - wxTabControl *AddTab(int id, const wxString& label, wxTabControl *existingTab = (wxTabControl *) NULL); + wxTabControl *AddTab(int id, const wxString& label, wxTabControl *existingTab = NULL); // Remove the tab without deleting the window bool RemoveTab(int id); diff --git a/include/wx/generic/textdlgg.h b/include/wx/generic/textdlgg.h index c8ed7d2e56..d9bdbdcfb7 100644 --- a/include/wx/generic/textdlgg.h +++ b/include/wx/generic/textdlgg.h @@ -97,7 +97,7 @@ WXDLLIMPEXP_CORE wxString wxGetTextFromUser(const wxString& message, const wxString& caption = wxGetTextFromUserPromptStr, const wxString& default_value = wxEmptyString, - wxWindow *parent = (wxWindow *) NULL, + wxWindow *parent = NULL, wxCoord x = wxDefaultCoord, wxCoord y = wxDefaultCoord, bool centre = true); @@ -106,7 +106,7 @@ WXDLLIMPEXP_CORE wxString wxGetPasswordFromUser(const wxString& message, const wxString& caption = wxGetPasswordFromUserPromptStr, const wxString& default_value = wxEmptyString, - wxWindow *parent = (wxWindow *) NULL, + wxWindow *parent = NULL, wxCoord x = wxDefaultCoord, wxCoord y = wxDefaultCoord, bool centre = true); diff --git a/include/wx/gtk/bitmap.h b/include/wx/gtk/bitmap.h index 0469a707f0..8c65fa9e80 100644 --- a/include/wx/gtk/bitmap.h +++ b/include/wx/gtk/bitmap.h @@ -85,7 +85,7 @@ public: wxBitmap GetSubBitmap( const wxRect& rect ) const; bool SaveFile(const wxString &name, wxBitmapType type, - const wxPalette *palette = (wxPalette *)NULL) const; + const wxPalette *palette = NULL) const; bool LoadFile(const wxString &name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); #if wxUSE_PALETTE diff --git a/include/wx/gtk/choice.h b/include/wx/gtk/choice.h index a0750e61b7..31704b746c 100644 --- a/include/wx/gtk/choice.h +++ b/include/wx/gtk/choice.h @@ -50,7 +50,7 @@ public: bool Create( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (wxString *) NULL, + int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr ); diff --git a/include/wx/gtk/colordlg.h b/include/wx/gtk/colordlg.h index 03998084fd..0b78f691b3 100644 --- a/include/wx/gtk/colordlg.h +++ b/include/wx/gtk/colordlg.h @@ -20,10 +20,10 @@ class WXDLLIMPEXP_CORE wxColourDialog : public wxDialog public: wxColourDialog() {} wxColourDialog(wxWindow *parent, - wxColourData *data = (wxColourData *)NULL); + wxColourData *data = NULL); virtual ~wxColourDialog() {} - bool Create(wxWindow *parent, wxColourData *data = (wxColourData *)NULL); + bool Create(wxWindow *parent, wxColourData *data = NULL); wxColourData &GetColourData() { return m_data; } diff --git a/include/wx/gtk/dataobj2.h b/include/wx/gtk/dataobj2.h index 58dd22c57a..b820f1c22c 100644 --- a/include/wx/gtk/dataobj2.h +++ b/include/wx/gtk/dataobj2.h @@ -49,7 +49,7 @@ public: } protected: - void Init() { m_pngData = (void *)NULL; m_pngSize = 0; } + void Init() { m_pngData = NULL; m_pngSize = 0; } void Clear() { free(m_pngData); } void ClearAll() { Clear(); Init(); } diff --git a/include/wx/gtk/dcclient.h b/include/wx/gtk/dcclient.h index da1d79a3f5..564975c655 100644 --- a/include/wx/gtk/dcclient.h +++ b/include/wx/gtk/dcclient.h @@ -70,9 +70,9 @@ public: double angle); virtual void DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *height, - wxCoord *descent = (wxCoord *) NULL, - wxCoord *externalLeading = (wxCoord *) NULL, - const wxFont *theFont = (wxFont *) NULL) const; + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL, + const wxFont *theFont = NULL) const; virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const; virtual void DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height ); virtual void DoSetDeviceClippingRegion( const wxRegion ®ion ); diff --git a/include/wx/gtk/dnd.h b/include/wx/gtk/dnd.h index 6f877727bc..af09892d61 100644 --- a/include/wx/gtk/dnd.h +++ b/include/wx/gtk/dnd.h @@ -29,7 +29,7 @@ class WXDLLIMPEXP_CORE wxDropTarget: public wxDropTargetBase { public: - wxDropTarget(wxDataObject *dataObject = (wxDataObject*) NULL ); + wxDropTarget(wxDataObject *dataObject = NULL ); virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def); virtual bool OnDrop(wxCoord x, wxCoord y); @@ -63,7 +63,7 @@ class WXDLLIMPEXP_CORE wxDropSource: public wxDropSourceBase { public: // constructor. set data later with SetData() - wxDropSource( wxWindow *win = (wxWindow *)NULL, + wxDropSource( wxWindow *win = NULL, const wxIcon © = wxNullIcon, const wxIcon &move = wxNullIcon, const wxIcon &none = wxNullIcon); diff --git a/include/wx/gtk/gnome/gprint.h b/include/wx/gtk/gnome/gprint.h index 853707da91..7458e01e4e 100644 --- a/include/wx/gtk/gnome/gprint.h +++ b/include/wx/gtk/gnome/gprint.h @@ -281,9 +281,9 @@ protected: wxFAIL_MSG( "not implemented" ); } void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y, - wxCoord *descent = (wxCoord *) NULL, - wxCoord *externalLeading = (wxCoord *) NULL, - const wxFont *theFont = (wxFont *) NULL ) const; + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL, + const wxFont *theFont = NULL ) const; void DoGetSize(int* width, int* height) const; void DoGetSizeMM(int *width, int *height) const; @@ -325,8 +325,8 @@ class wxGnomePrintPreview : public wxPrintPreviewBase { public: wxGnomePrintPreview(wxPrintout *printout, - wxPrintout *printoutForPrinting = (wxPrintout *) NULL, - wxPrintDialogData *data = (wxPrintDialogData *) NULL); + wxPrintout *printoutForPrinting = NULL, + wxPrintDialogData *data = NULL); wxGnomePrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting, wxPrintData *data); diff --git a/include/wx/gtk/menuitem.h b/include/wx/gtk/menuitem.h index fc60a7d3e6..78d967612a 100644 --- a/include/wx/gtk/menuitem.h +++ b/include/wx/gtk/menuitem.h @@ -19,12 +19,12 @@ class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase { public: - wxMenuItem(wxMenu *parentMenu = (wxMenu *)NULL, + wxMenuItem(wxMenu *parentMenu = NULL, int id = wxID_SEPARATOR, const wxString& text = wxEmptyString, const wxString& help = wxEmptyString, wxItemKind kind = wxITEM_NORMAL, - wxMenu *subMenu = (wxMenu *)NULL); + wxMenu *subMenu = NULL); virtual ~wxMenuItem(); // implement base class virtuals diff --git a/include/wx/gtk/print.h b/include/wx/gtk/print.h index 0e91688503..795cf71ccf 100644 --- a/include/wx/gtk/print.h +++ b/include/wx/gtk/print.h @@ -288,9 +288,9 @@ protected: wxFAIL_MSG( "not implemented" ); } void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y, - wxCoord *descent = (wxCoord *) NULL, - wxCoord *externalLeading = (wxCoord *) NULL, - const wxFont *theFont = (wxFont *) NULL ) const; + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL, + const wxFont *theFont = NULL ) const; void DoGetSize(int* width, int* height) const; void DoGetSizeMM(int *width, int *height) const; @@ -327,8 +327,8 @@ class WXDLLIMPEXP_CORE wxGtkPrintPreview : public wxPrintPreviewBase { public: wxGtkPrintPreview(wxPrintout *printout, - wxPrintout *printoutForPrinting = (wxPrintout *) NULL, - wxPrintDialogData *data = (wxPrintDialogData *) NULL); + wxPrintout *printoutForPrinting = NULL, + wxPrintDialogData *data = NULL); wxGtkPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting, wxPrintData *data); diff --git a/include/wx/gtk/window.h b/include/wx/gtk/window.h index fffe0778da..4d30ba2256 100644 --- a/include/wx/gtk/window.h +++ b/include/wx/gtk/window.h @@ -84,8 +84,8 @@ public: virtual int GetCharWidth() const; virtual void GetTextExtent(const wxString& string, int *x, int *y, - int *descent = (int *) NULL, - int *externalLeading = (int *) NULL, + int *descent = NULL, + int *externalLeading = NULL, const wxFont *theFont = (const wxFont *) NULL) const; @@ -96,7 +96,7 @@ public: virtual int GetScrollThumb( int orient ) const; virtual int GetScrollRange( int orient ) const; virtual void ScrollWindow( int dx, int dy, - const wxRect* rect = (wxRect *) NULL ); + const wxRect* rect = NULL ); virtual bool ScrollLines(int lines); virtual bool ScrollPages(int pages); diff --git a/include/wx/gtk1/bitmap.h b/include/wx/gtk1/bitmap.h index 5ae629f1cd..769083eee3 100644 --- a/include/wx/gtk1/bitmap.h +++ b/include/wx/gtk1/bitmap.h @@ -96,7 +96,7 @@ public: wxBitmap GetSubBitmap( const wxRect& rect ) const; bool SaveFile(const wxString &name, wxBitmapType type, - const wxPalette *palette = (wxPalette *)NULL) const; + const wxPalette *palette = NULL) const; bool LoadFile(const wxString &name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); #if wxUSE_PALETTE diff --git a/include/wx/gtk1/choice.h b/include/wx/gtk1/choice.h index c78e8308fe..139b8811e2 100644 --- a/include/wx/gtk1/choice.h +++ b/include/wx/gtk1/choice.h @@ -29,7 +29,7 @@ public: const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr ) { - m_strings = (wxSortedArrayString *)NULL; + m_strings = NULL; Create(parent, id, pos, size, n, choices, style, validator, name); } @@ -41,7 +41,7 @@ public: const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr ) { - m_strings = (wxSortedArrayString *)NULL; + m_strings = NULL; Create(parent, id, pos, size, choices, style, validator, name); } @@ -49,7 +49,7 @@ public: bool Create( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (wxString *) NULL, + int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr ); diff --git a/include/wx/gtk1/colordlg.h b/include/wx/gtk1/colordlg.h index 5da29e6af3..ed07836ef2 100644 --- a/include/wx/gtk1/colordlg.h +++ b/include/wx/gtk1/colordlg.h @@ -23,10 +23,10 @@ class WXDLLIMPEXP_CORE wxColourDialog : public wxDialog public: wxColourDialog() {} wxColourDialog(wxWindow *parent, - wxColourData *data = (wxColourData *)NULL); + wxColourData *data = NULL); virtual ~wxColourDialog() {} - bool Create(wxWindow *parent, wxColourData *data = (wxColourData *)NULL); + bool Create(wxWindow *parent, wxColourData *data = NULL); wxColourData &GetColourData() { return m_data; } diff --git a/include/wx/gtk1/dataobj2.h b/include/wx/gtk1/dataobj2.h index 8f0e07fe7c..74cfa03389 100644 --- a/include/wx/gtk1/dataobj2.h +++ b/include/wx/gtk1/dataobj2.h @@ -36,7 +36,7 @@ public: virtual bool SetData(size_t len, const void *buf); protected: - void Init() { m_pngData = (void *)NULL; m_pngSize = 0; } + void Init() { m_pngData = NULL; m_pngSize = 0; } void Clear() { free(m_pngData); } void ClearAll() { Clear(); Init(); } diff --git a/include/wx/gtk1/dcclient.h b/include/wx/gtk1/dcclient.h index bf094360fa..bc6ade1901 100644 --- a/include/wx/gtk1/dcclient.h +++ b/include/wx/gtk1/dcclient.h @@ -73,9 +73,9 @@ protected: double angle); virtual void DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *height, - wxCoord *descent = (wxCoord *) NULL, - wxCoord *externalLeading = (wxCoord *) NULL, - const wxFont *theFont = (wxFont *) NULL) const; + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL, + const wxFont *theFont = NULL) const; public: virtual wxCoord GetCharWidth() const; diff --git a/include/wx/gtk1/dnd.h b/include/wx/gtk1/dnd.h index 9330bdde9a..965dcdf4ce 100644 --- a/include/wx/gtk1/dnd.h +++ b/include/wx/gtk1/dnd.h @@ -48,7 +48,7 @@ class WXDLLIMPEXP_FWD_CORE wxDropSource; class WXDLLIMPEXP_CORE wxDropTarget: public wxDropTargetBase { public: - wxDropTarget(wxDataObject *dataObject = (wxDataObject*) NULL ); + wxDropTarget(wxDataObject *dataObject = NULL ); virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def); virtual bool OnDrop(wxCoord x, wxCoord y); @@ -82,7 +82,7 @@ class WXDLLIMPEXP_CORE wxDropSource: public wxDropSourceBase { public: // constructor. set data later with SetData() - wxDropSource( wxWindow *win = (wxWindow *)NULL, + wxDropSource( wxWindow *win = NULL, const wxIcon © = wxNullIcon, const wxIcon &move = wxNullIcon, const wxIcon &none = wxNullIcon); diff --git a/include/wx/gtk1/menuitem.h b/include/wx/gtk1/menuitem.h index 827cf6e780..48b3778e36 100644 --- a/include/wx/gtk1/menuitem.h +++ b/include/wx/gtk1/menuitem.h @@ -19,12 +19,12 @@ class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase { public: - wxMenuItem(wxMenu *parentMenu = (wxMenu *)NULL, + wxMenuItem(wxMenu *parentMenu = NULL, int id = wxID_SEPARATOR, const wxString& text = wxEmptyString, const wxString& help = wxEmptyString, wxItemKind kind = wxITEM_NORMAL, - wxMenu *subMenu = (wxMenu *)NULL); + wxMenu *subMenu = NULL); virtual ~wxMenuItem(); // implement base class virtuals @@ -55,7 +55,7 @@ public: const wxString& text, const wxString& help, bool isCheckable, - wxMenu *subMenu = (wxMenu *)NULL); + wxMenu *subMenu = NULL); private: // common part of all ctors diff --git a/include/wx/gtk1/scrolbar.h b/include/wx/gtk1/scrolbar.h index a9af5a7c62..4a0eb2dfdc 100644 --- a/include/wx/gtk1/scrolbar.h +++ b/include/wx/gtk1/scrolbar.h @@ -26,7 +26,7 @@ class WXDLLIMPEXP_CORE wxScrollBar: public wxScrollBarBase { public: wxScrollBar() - { m_adjust = (GtkAdjustment *) NULL; m_oldPos = 0.0; } + { m_adjust = NULL; m_oldPos = 0.0; } inline wxScrollBar( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, diff --git a/include/wx/gtk1/window.h b/include/wx/gtk1/window.h index 1fb59e507e..65c965d13e 100644 --- a/include/wx/gtk1/window.h +++ b/include/wx/gtk1/window.h @@ -86,8 +86,8 @@ public: virtual int GetCharWidth() const; virtual void GetTextExtent(const wxString& string, int *x, int *y, - int *descent = (int *) NULL, - int *externalLeading = (int *) NULL, + int *descent = NULL, + int *externalLeading = NULL, const wxFont *theFont = (const wxFont *) NULL) const; @@ -102,7 +102,7 @@ public: virtual int GetScrollThumb( int orient ) const; virtual int GetScrollRange( int orient ) const; virtual void ScrollWindow( int dx, int dy, - const wxRect* rect = (wxRect *) NULL ); + const wxRect* rect = NULL ); #if wxUSE_DRAG_AND_DROP virtual void SetDropTarget( wxDropTarget *dropTarget ); diff --git a/include/wx/helpbase.h b/include/wx/helpbase.h index bc913e7f21..47af76dd34 100644 --- a/include/wx/helpbase.h +++ b/include/wx/helpbase.h @@ -82,7 +82,7 @@ public: wxPoint *WXUNUSED(pos) = NULL, bool *WXUNUSED(newFrameEachTime) = NULL) { - return (wxFrame*) NULL; // does nothing by default + return NULL; // does nothing by default } virtual bool Quit() = 0; diff --git a/include/wx/html/webkit.h b/include/wx/html/webkit.h index 994fb62d47..1fc3242fc2 100644 --- a/include/wx/html/webkit.h +++ b/include/wx/html/webkit.h @@ -145,7 +145,7 @@ public: void SetNavigationType(int navType) { m_navType = navType; } int GetNavigationType() { return m_navType; } - wxWebKitBeforeLoadEvent( wxWindow* win = (wxWindow*) NULL ); + wxWebKitBeforeLoadEvent( wxWindow* win = NULL ); wxEvent *Clone(void) const { return new wxWebKitBeforeLoadEvent(*this); } protected: @@ -164,7 +164,7 @@ public: wxString GetURL() { return m_url; } void SetURL(const wxString& url) { m_url = url; } - wxWebKitStateChangedEvent( wxWindow* win = (wxWindow*) NULL ); + wxWebKitStateChangedEvent( wxWindow* win = NULL ); wxEvent *Clone(void) const { return new wxWebKitStateChangedEvent(*this); } protected: @@ -212,21 +212,21 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_WEBKIT_NEW_WINDOW, wxWebKitNew wxID_ANY, \ wxID_ANY, \ wxWebKitStateChangedEventHandler( func ), \ - (wxObject *) NULL ), + NULL ), #define EVT_WEBKIT_BEFORE_LOAD(func) \ DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBKIT_BEFORE_LOAD, \ wxID_ANY, \ wxID_ANY, \ wxWebKitBeforeLoadEventHandler( func ), \ - (wxObject *) NULL ), + NULL ), #define EVT_WEBKIT_NEW_WINDOW(func) \ DECLARE_EVENT_TABLE_ENTRY( wxEVT_WEBKIT_NEW_WINDOW, \ wxID_ANY, \ wxID_ANY, \ wxWebKitNewWindowEventFunction( func ), \ - (wxObject *) NULL ), + NULL ), #endif // wxUSE_WEBKIT #endif diff --git a/include/wx/image.h b/include/wx/image.h index fd76956841..76b9c81c6a 100644 --- a/include/wx/image.h +++ b/include/wx/image.h @@ -286,7 +286,7 @@ public: // Rotates the image about the given point, 'angle' radians. // Returns the rotated image, leaving this image intact. wxImage Rotate(double angle, const wxPoint & centre_of_rotation, - bool interpolating = true, wxPoint * offset_after_rotation = (wxPoint*) NULL) const; + bool interpolating = true, wxPoint * offset_after_rotation = NULL) const; wxImage Rotate90( bool clockwise = true ) const; wxImage Mirror( bool horizontally = true ) const; diff --git a/include/wx/log.h b/include/wx/log.h index 83ea99678e..aa8a00e216 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -378,7 +378,7 @@ class WXDLLIMPEXP_BASE wxLogStderr : public wxLog { public: // redirect log output to a FILE - wxLogStderr(FILE *fp = (FILE *) NULL); + wxLogStderr(FILE *fp = NULL); protected: // implement sink function diff --git a/include/wx/mediactrl.h b/include/wx/mediactrl.h index 49612964b0..b631b97096 100644 --- a/include/wx/mediactrl.h +++ b/include/wx/mediactrl.h @@ -337,18 +337,18 @@ typedef void (wxEvtHandler::*wxMediaEventFunction)(wxMediaEvent&); wxEVENT_HANDLER_CAST(wxMediaEventFunction, func) //Macro for usage with message maps -#define EVT_MEDIA_FINISHED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_FINISHED, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ), -#define EVT_MEDIA_STOP(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_STOP, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ), +#define EVT_MEDIA_FINISHED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_FINISHED, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ), +#define EVT_MEDIA_STOP(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_STOP, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ), wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_LOADED, wxMediaEvent ) -#define EVT_MEDIA_LOADED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_LOADED, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ), +#define EVT_MEDIA_LOADED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_LOADED, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ), wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_STATECHANGED, wxMediaEvent ) wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_PLAY, wxMediaEvent ) wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_PAUSE, wxMediaEvent ) -#define EVT_MEDIA_STATECHANGED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_STATECHANGED, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ), -#define EVT_MEDIA_PLAY(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_PLAY, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ), -#define EVT_MEDIA_PAUSE(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_PAUSE, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ), +#define EVT_MEDIA_STATECHANGED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_STATECHANGED, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ), +#define EVT_MEDIA_PLAY(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_PLAY, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ), +#define EVT_MEDIA_PAUSE(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_PAUSE, winid, wxID_ANY, wxMediaEventHandler(fn), NULL ), // ---------------------------------------------------------------------------- // common backend base class used by many other backends diff --git a/include/wx/menu.h b/include/wx/menu.h index 963a8fac0b..1280ea647e 100644 --- a/include/wx/menu.h +++ b/include/wx/menu.h @@ -267,7 +267,7 @@ public: // Updates the UI for a menu and all submenus recursively. source is the // object that has the update event handlers defined for it. If NULL, the // menu or associated window will be used. - void UpdateUI(wxEvtHandler* source = (wxEvtHandler*)NULL); + void UpdateUI(wxEvtHandler* source = NULL); // get the menu bar this menu is attached to (may be NULL, always NULL for // popup menus). Traverse up the menu hierarchy to find it. diff --git a/include/wx/menuitem.h b/include/wx/menuitem.h index 1f98a5d1ee..51ce402b49 100644 --- a/include/wx/menuitem.h +++ b/include/wx/menuitem.h @@ -39,12 +39,12 @@ class WXDLLIMPEXP_CORE wxMenuItemBase : public wxObject { public: // creation - static wxMenuItem *New(wxMenu *parentMenu = (wxMenu *)NULL, + static wxMenuItem *New(wxMenu *parentMenu = NULL, int itemid = wxID_SEPARATOR, const wxString& text = wxEmptyString, const wxString& help = wxEmptyString, wxItemKind kind = wxITEM_NORMAL, - wxMenu *subMenu = (wxMenu *)NULL); + wxMenu *subMenu = NULL); // destruction: wxMenuItem will delete its submenu virtual ~wxMenuItemBase(); @@ -138,7 +138,7 @@ public: const wxString& text, const wxString& help, bool isCheckable, - wxMenu *subMenu = (wxMenu *)NULL) + wxMenu *subMenu = NULL) { return New(parentMenu, itemid, text, help, isCheckable ? wxITEM_CHECK : wxITEM_NORMAL, subMenu); @@ -155,12 +155,12 @@ protected: bool m_isEnabled; // is enabled? // this ctor is for the derived classes only, we're never created directly - wxMenuItemBase(wxMenu *parentMenu = (wxMenu *)NULL, + wxMenuItemBase(wxMenu *parentMenu = NULL, int itemid = wxID_SEPARATOR, const wxString& text = wxEmptyString, const wxString& help = wxEmptyString, wxItemKind kind = wxITEM_NORMAL, - wxMenu *subMenu = (wxMenu *)NULL); + wxMenu *subMenu = NULL); private: // and, if we have one ctor, compiler won't generate a default copy one, so diff --git a/include/wx/mgl/bitmap.h b/include/wx/mgl/bitmap.h index 3fbbb9b73d..913c2ff756 100644 --- a/include/wx/mgl/bitmap.h +++ b/include/wx/mgl/bitmap.h @@ -47,7 +47,7 @@ public: virtual wxBitmap GetSubBitmap(const wxRect& rect) const; - virtual bool SaveFile(const wxString &name, wxBitmapType type, const wxPalette *palette = (wxPalette *) NULL) const; + virtual bool SaveFile(const wxString &name, wxBitmapType type, const wxPalette *palette = NULL) const; virtual bool LoadFile(const wxString &name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); virtual wxPalette *GetPalette() const; diff --git a/include/wx/mgl/window.h b/include/wx/mgl/window.h index e47e113bfc..f89bfe3bc5 100644 --- a/include/wx/mgl/window.h +++ b/include/wx/mgl/window.h @@ -76,8 +76,8 @@ public: virtual int GetCharWidth() const; virtual void GetTextExtent(const wxString& string, int *x, int *y, - int *descent = (int *) NULL, - int *externalLeading = (int *) NULL, + int *descent = NULL, + int *externalLeading = NULL, const wxFont *theFont = (const wxFont *) NULL) const; diff --git a/include/wx/motif/bmpmotif.h b/include/wx/motif/bmpmotif.h index 2aa5178bfc..a176e90fc0 100644 --- a/include/wx/motif/bmpmotif.h +++ b/include/wx/motif/bmpmotif.h @@ -24,7 +24,7 @@ public: m_armPixmap = (WXPixmap)NULL; m_insensPixmap = (WXPixmap)NULL; m_image = (WXImage)NULL; - m_display = (WXDisplay*)NULL; + m_display = NULL; SetColoursChanged(); } diff --git a/include/wx/motif/menuitem.h b/include/wx/motif/menuitem.h index e8b114573a..d2bdfd10c8 100644 --- a/include/wx/motif/menuitem.h +++ b/include/wx/motif/menuitem.h @@ -24,12 +24,12 @@ class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase { public: // ctor & dtor - wxMenuItem(wxMenu *parentMenu = (wxMenu *)NULL, + wxMenuItem(wxMenu *parentMenu = NULL, int id = wxID_SEPARATOR, const wxString& text = wxEmptyString, const wxString& help = wxEmptyString, wxItemKind kind = wxITEM_NORMAL, - wxMenu *subMenu = (wxMenu *)NULL); + wxMenu *subMenu = NULL); virtual ~wxMenuItem(); // accessors (some more are inherited from wxOwnerDrawn or are below) diff --git a/include/wx/motif/window.h b/include/wx/motif/window.h index a5bc5383bc..12760abecb 100644 --- a/include/wx/motif/window.h +++ b/include/wx/motif/window.h @@ -73,8 +73,8 @@ public: virtual int GetCharWidth() const; virtual void GetTextExtent(const wxString& string, int *x, int *y, - int *descent = (int *) NULL, - int *externalLeading = (int *) NULL, + int *descent = NULL, + int *externalLeading = NULL, const wxFont *theFont = (const wxFont *) NULL) const; @@ -85,7 +85,7 @@ public: virtual int GetScrollThumb( int orient ) const; virtual int GetScrollRange( int orient ) const; virtual void ScrollWindow( int dx, int dy, - const wxRect* rect = (wxRect *) NULL ); + const wxRect* rect = NULL ); #if wxUSE_DRAG_AND_DROP virtual void SetDropTarget( wxDropTarget *dropTarget ); diff --git a/include/wx/msw/dragimag.h b/include/wx/msw/dragimag.h index fbe7b402f1..80d27e77d4 100644 --- a/include/wx/msw/dragimag.h +++ b/include/wx/msw/dragimag.h @@ -214,7 +214,7 @@ public: // Begin drag. hotspot is the location of the drag position relative to the upper-left // corner of the image. - bool BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullScreen = false, wxRect* rect = (wxRect*) NULL); + bool BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullScreen = false, wxRect* rect = NULL); // Begin drag. hotspot is the location of the drag position relative to the upper-left // corner of the image. This is full screen only. fullScreenRect gives the diff --git a/include/wx/msw/enhmeta.h b/include/wx/msw/enhmeta.h index e828b29358..b69aa33736 100644 --- a/include/wx/msw/enhmeta.h +++ b/include/wx/msw/enhmeta.h @@ -37,7 +37,7 @@ public: { Free(); } // display the picture stored in the metafile on the given DC - bool Play(wxDC *dc, wxRect *rectBound = (wxRect *)NULL); + bool Play(wxDC *dc, wxRect *rectBound = NULL); // accessors virtual bool IsOk() const { return m_hMF != 0; } diff --git a/include/wx/msw/menuitem.h b/include/wx/msw/menuitem.h index 4518daf143..4efe3b98b7 100644 --- a/include/wx/msw/menuitem.h +++ b/include/wx/msw/menuitem.h @@ -31,12 +31,12 @@ class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase { public: // ctor & dtor - wxMenuItem(wxMenu *parentMenu = (wxMenu *)NULL, + wxMenuItem(wxMenu *parentMenu = NULL, int id = wxID_SEPARATOR, const wxString& name = wxEmptyString, const wxString& help = wxEmptyString, wxItemKind kind = wxITEM_NORMAL, - wxMenu *subMenu = (wxMenu *)NULL); + wxMenu *subMenu = NULL); virtual ~wxMenuItem(); // override base class virtuals diff --git a/include/wx/msw/ole/activex.h b/include/wx/msw/ole/activex.h index 2436e7933b..8f557c8215 100644 --- a/include/wx/msw/ole/activex.h +++ b/include/wx/msw/ole/activex.h @@ -220,7 +220,7 @@ typedef void (wxEvtHandler::*wxActiveXEventFunction)(wxActiveXEvent&); #define wxActiveXEventHandler(func) \ wxEVENT_HANDLER_CAST( wxActiveXEventFunction, func ) -#define EVT_ACTIVEX(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_ACTIVEX, id, -1, wxActiveXEventHandler( fn ), (wxObject *) NULL ), +#define EVT_ACTIVEX(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_ACTIVEX, id, -1, wxActiveXEventHandler( fn ), NULL ), #endif // wxUSE_ACTIVEX diff --git a/include/wx/msw/ole/automtn.h b/include/wx/msw/ole/automtn.h index 4feca6ff74..87f2ff1538 100644 --- a/include/wx/msw/ole/automtn.h +++ b/include/wx/msw/ole/automtn.h @@ -64,7 +64,7 @@ public: const wxVariant& arg5 = wxNullVariant, const wxVariant& arg6 = wxNullVariant); // Get/Put property - wxVariant GetProperty(const wxString& property, int noArgs = 0, wxVariant args[] = (wxVariant*) NULL) const; + wxVariant GetProperty(const wxString& property, int noArgs = 0, wxVariant args[] = NULL) const; wxVariant GetPropertyArray(const wxString& property, int noArgs, const wxVariant **args) const; wxVariant GetProperty(const wxString& property, const wxVariant& arg1, const wxVariant& arg2 = wxNullVariant, @@ -87,7 +87,7 @@ public: // A way of initialising another wxAutomationObject with a dispatch object, // without having to deal with nasty IDispatch pointers. - bool GetObject(wxAutomationObject& obj, const wxString& property, int noArgs = 0, wxVariant args[] = (wxVariant*) NULL) const; + bool GetObject(wxAutomationObject& obj, const wxString& property, int noArgs = 0, wxVariant args[] = NULL) const; bool GetObject(wxAutomationObject& obj, const wxString& property, int noArgs, const wxVariant **args) const; public: diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h index ededcaeca7..61f2bb4ae4 100644 --- a/include/wx/msw/window.h +++ b/include/wx/msw/window.h @@ -91,8 +91,8 @@ public: virtual int GetCharWidth() const; virtual void GetTextExtent(const wxString& string, int *x, int *y, - int *descent = (int *) NULL, - int *externalLeading = (int *) NULL, + int *descent = NULL, + int *externalLeading = NULL, const wxFont *theFont = (const wxFont *) NULL) const; @@ -103,7 +103,7 @@ public: virtual int GetScrollThumb( int orient ) const; virtual int GetScrollRange( int orient ) const; virtual void ScrollWindow( int dx, int dy, - const wxRect* rect = (wxRect *) NULL ); + const wxRect* rect = NULL ); virtual bool ScrollLines(int lines); virtual bool ScrollPages(int pages); diff --git a/include/wx/os2/bitmap.h b/include/wx/os2/bitmap.h index 9915a6a14d..0206629798 100644 --- a/include/wx/os2/bitmap.h +++ b/include/wx/os2/bitmap.h @@ -184,12 +184,12 @@ public: void SetQuality(int nQ); wxPalette* GetPalette() const - { return (GetBitmapData() ? (& GetBitmapData()->m_vBitmapPalette) : (wxPalette*) NULL); } + { return (GetBitmapData() ? (& GetBitmapData()->m_vBitmapPalette) : NULL); } void SetPalette(const wxPalette& rPalette); inline wxMask* GetMask() const - { return (GetBitmapData() ? GetBitmapData()->m_pBitmapMask : (wxMask*) NULL); } + { return (GetBitmapData() ? GetBitmapData()->m_pBitmapMask : NULL); } void SetMask(wxMask* pMask) ; @@ -205,7 +205,7 @@ public: { if (GetBitmapData()) GetBitmapData()->m_pSelectedInto = pDc; } inline wxDC* GetSelectedInto() const - { return (GetBitmapData() ? GetBitmapData()->m_pSelectedInto : (wxDC*) NULL); } + { return (GetBitmapData() ? GetBitmapData()->m_pSelectedInto : NULL); } inline bool IsMono(void) const { return m_bIsMono; } diff --git a/include/wx/os2/dataobj2.h b/include/wx/os2/dataobj2.h index 302dd1dc2a..a05e2d6478 100644 --- a/include/wx/os2/dataobj2.h +++ b/include/wx/os2/dataobj2.h @@ -37,7 +37,7 @@ public: virtual bool SetData(size_t len, const void *buf); protected: - void Init() { m_pngData = (void *)NULL; m_pngSize = 0; } + void Init() { m_pngData = NULL; m_pngSize = 0; } void Clear() { free(m_pngData); } void ClearAll() { Clear(); Init(); } diff --git a/include/wx/os2/dnd.h b/include/wx/os2/dnd.h index 05e34264d1..ee3c574515 100644 --- a/include/wx/os2/dnd.h +++ b/include/wx/os2/dnd.h @@ -62,7 +62,7 @@ protected: class WXDLLIMPEXP_CORE wxDropTarget : public wxDropTargetBase { public: - wxDropTarget(wxDataObject* pDataObject = (wxDataObject*)NULL); + wxDropTarget(wxDataObject* pDataObject = NULL); virtual ~wxDropTarget(); // diff --git a/include/wx/os2/menuitem.h b/include/wx/os2/menuitem.h index f1ec069468..3c726a9226 100644 --- a/include/wx/os2/menuitem.h +++ b/include/wx/os2/menuitem.h @@ -58,7 +58,7 @@ public: ,const wxString& rsText ,const wxString& rsHelp ,bool bIsCheckable - ,wxMenu* pSubMenu = (wxMenu *)NULL + ,wxMenu* pSubMenu = NULL ); virtual ~wxMenuItem(); diff --git a/include/wx/os2/treectrl.h b/include/wx/os2/treectrl.h index 46f497cf89..6b81a77292 100644 --- a/include/wx/os2/treectrl.h +++ b/include/wx/os2/treectrl.h @@ -448,7 +448,7 @@ public: // // returns NULL for OS/2 in ALL cases // - wxTextCtrl* GetEditControl(void) const {return (wxTextCtrl*)NULL;} + wxTextCtrl* GetEditControl(void) const {return NULL;} // // End editing and accept or discard the changes to item label diff --git a/include/wx/os2/window.h b/include/wx/os2/window.h index 4aeb845c43..6f2294c6b5 100644 --- a/include/wx/os2/window.h +++ b/include/wx/os2/window.h @@ -101,8 +101,8 @@ public: virtual void GetTextExtent( const wxString& rString ,int* pX ,int* pY - ,int* pDescent = (int *)NULL - ,int* pExternalLeading = (int *)NULL + ,int* pDescent = NULL + ,int* pExternalLeading = NULL ,const wxFont* pTheFont = (const wxFont *)NULL ) const; #if wxUSE_MENUS_NATIVE @@ -127,7 +127,7 @@ public: virtual int GetScrollRange(int nOrient) const; virtual void ScrollWindow( int nDx ,int nDy - ,const wxRect* pRect = (wxRect *)NULL + ,const wxRect* pRect = NULL ); inline HWND GetScrollBarHorz(void) const {return m_hWndScrollBarHorz;} diff --git a/include/wx/osx/dnd.h b/include/wx/osx/dnd.h index 2f0b8d48ef..dea6815a45 100644 --- a/include/wx/osx/dnd.h +++ b/include/wx/osx/dnd.h @@ -49,7 +49,7 @@ class WXDLLIMPEXP_CORE wxDropTarget: public wxDropTargetBase { public: - wxDropTarget(wxDataObject *dataObject = (wxDataObject*) NULL ); + wxDropTarget(wxDataObject *dataObject = NULL ); virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def); virtual bool OnDrop(wxCoord x, wxCoord y); @@ -74,7 +74,7 @@ public: // // NB: the "wxWindow *win" parameter is unused and is here only for wxGTK // compatibility, as well as both icon parameters - wxDropSource( wxWindow *win = (wxWindow *)NULL, + wxDropSource( wxWindow *win = NULL, const wxCursor &cursorCopy = wxNullCursor, const wxCursor &cursorMove = wxNullCursor, const wxCursor &cursorStop = wxNullCursor); diff --git a/include/wx/osx/menuitem.h b/include/wx/osx/menuitem.h index 6171b124ee..8e9e82da31 100644 --- a/include/wx/osx/menuitem.h +++ b/include/wx/osx/menuitem.h @@ -29,12 +29,12 @@ class WXDLLIMPEXP_CORE wxMenuItem: public wxMenuItemBase { public: // ctor & dtor - wxMenuItem(wxMenu *parentMenu = (wxMenu *)NULL, + wxMenuItem(wxMenu *parentMenu = NULL, int id = wxID_SEPARATOR, const wxString& name = wxEmptyString, const wxString& help = wxEmptyString, wxItemKind kind = wxITEM_NORMAL, - wxMenu *subMenu = (wxMenu *)NULL); + wxMenu *subMenu = NULL); virtual ~wxMenuItem(); // override base class virtuals diff --git a/include/wx/osx/treectrl.h b/include/wx/osx/treectrl.h index a8c92b288f..644e8af2b0 100644 --- a/include/wx/osx/treectrl.h +++ b/include/wx/osx/treectrl.h @@ -272,20 +272,20 @@ public: typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); -#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, -#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, #endif // _WX_TREECTRL_H_ diff --git a/include/wx/osx/window.h b/include/wx/osx/window.h index 783aee0929..133b6d8fc9 100644 --- a/include/wx/osx/window.h +++ b/include/wx/osx/window.h @@ -99,7 +99,7 @@ public: virtual int GetScrollThumb( int orient ) const; virtual int GetScrollRange( int orient ) const; virtual void ScrollWindow( int dx, int dy, - const wxRect* rect = (wxRect *) NULL ); + const wxRect* rect = NULL ); virtual void AlwaysShowScrollbars(bool horz = true, bool vert = true); virtual bool IsScrollbarAlwaysShown(int orient) const { diff --git a/include/wx/palmos/dragimag.h b/include/wx/palmos/dragimag.h index 7da8d04407..774dd768b4 100644 --- a/include/wx/palmos/dragimag.h +++ b/include/wx/palmos/dragimag.h @@ -203,7 +203,7 @@ public: // Begin drag. hotspot is the location of the drag position relative to the upper-left // corner of the image. - bool BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullScreen = false, wxRect* rect = (wxRect*) NULL); + bool BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullScreen = false, wxRect* rect = NULL); // Begin drag. hotspot is the location of the drag position relative to the upper-left // corner of the image. This is full screen only. fullScreenRect gives the diff --git a/include/wx/palmos/enhmeta.h b/include/wx/palmos/enhmeta.h index e986395628..70c0c924da 100644 --- a/include/wx/palmos/enhmeta.h +++ b/include/wx/palmos/enhmeta.h @@ -37,7 +37,7 @@ public: { Free(); } // display the picture stored in the metafile on the given DC - bool Play(wxDC *dc, wxRect *rectBound = (wxRect *)NULL); + bool Play(wxDC *dc, wxRect *rectBound = NULL); // accessors virtual bool IsOk() const { return m_hMF != 0; } diff --git a/include/wx/palmos/glcanvas.h b/include/wx/palmos/glcanvas.h index 5b0fded577..e4e5275523 100644 --- a/include/wx/palmos/glcanvas.h +++ b/include/wx/palmos/glcanvas.h @@ -63,17 +63,17 @@ public: const wxPalette& palette = wxNullPalette); wxGLCanvas(wxWindow *parent, - const wxGLContext *shared = (wxGLContext *) NULL, + const wxGLContext *shared = NULL, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxGLCanvasName, - int *attribList = (int *) NULL, + int *attribList = NULL, const wxPalette& palette = wxNullPalette); wxGLCanvas(wxWindow *parent, - const wxGLCanvas *shared = (wxGLCanvas *)NULL, + const wxGLCanvas *shared = NULL, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, @@ -110,7 +110,7 @@ public: inline WXHDC GetHDC() const { return m_hDC; } - void SetupPixelFormat(int *attribList = (int *) NULL); + void SetupPixelFormat(int *attribList = NULL); void SetupPalette(const wxPalette& palette); diff --git a/include/wx/palmos/menuitem.h b/include/wx/palmos/menuitem.h index b9cec3003f..b49dc215bd 100644 --- a/include/wx/palmos/menuitem.h +++ b/include/wx/palmos/menuitem.h @@ -31,12 +31,12 @@ class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase { public: // ctor & dtor - wxMenuItem(wxMenu *parentMenu = (wxMenu *)NULL, + wxMenuItem(wxMenu *parentMenu = NULL, int id = wxID_SEPARATOR, const wxString& name = wxEmptyString, const wxString& help = wxEmptyString, wxItemKind kind = wxITEM_NORMAL, - wxMenu *subMenu = (wxMenu *)NULL); + wxMenu *subMenu = NULL); virtual ~wxMenuItem(); // override base class virtuals @@ -62,7 +62,7 @@ public: const wxString& text, const wxString& help, bool isCheckable, - wxMenu *subMenu = (wxMenu *)NULL); + wxMenu *subMenu = NULL); private: // common part of all ctors diff --git a/include/wx/palmos/pen.h b/include/wx/palmos/pen.h index 4dd60758b9..7381b3381f 100644 --- a/include/wx/palmos/pen.h +++ b/include/wx/palmos/pen.h @@ -111,13 +111,13 @@ public: wxPenCap GetCap() const { return (M_PENDATA ? M_PENDATA->m_cap : 0); }; int GetDashes(wxDash **ptr) const { - *ptr = (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : (wxDash*) NULL); + *ptr = (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : NULL); return (M_PENDATA ? M_PENDATA->m_nbDash : 0); } - wxDash* GetDash() const { return (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : (wxDash*)NULL); }; + wxDash* GetDash() const { return (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : NULL); }; inline int GetDashCount() const { return (M_PENDATA ? M_PENDATA->m_nbDash : 0); }; - inline wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : (wxBitmap*) NULL); }; + inline wxBitmap *GetStipple() const { return (M_PENDATA ? (& M_PENDATA->m_stipple) : NULL); }; // Internal bool RealizeResource(); diff --git a/include/wx/palmos/window.h b/include/wx/palmos/window.h index 09c8d5dd9f..354d8173c7 100644 --- a/include/wx/palmos/window.h +++ b/include/wx/palmos/window.h @@ -81,8 +81,8 @@ public: virtual int GetCharWidth() const; virtual void GetTextExtent(const wxString& string, int *x, int *y, - int *descent = (int *) NULL, - int *externalLeading = (int *) NULL, + int *descent = NULL, + int *externalLeading = NULL, const wxFont *theFont = (const wxFont *) NULL) const; @@ -97,7 +97,7 @@ public: virtual int GetScrollThumb( int orient ) const; virtual int GetScrollRange( int orient ) const; virtual void ScrollWindow( int dx, int dy, - const wxRect* rect = (wxRect *) NULL ); + const wxRect* rect = NULL ); virtual bool ScrollLines(int lines); virtual bool ScrollPages(int pages); diff --git a/include/wx/prntbase.h b/include/wx/prntbase.h index 4dc54556c2..031f638afa 100644 --- a/include/wx/prntbase.h +++ b/include/wx/prntbase.h @@ -169,7 +169,7 @@ private: class WXDLLIMPEXP_CORE wxPrinterBase: public wxObject { public: - wxPrinterBase(wxPrintDialogData *data = (wxPrintDialogData *) NULL); + wxPrinterBase(wxPrintDialogData *data = NULL); virtual ~wxPrinterBase(); virtual wxWindow *CreateAbortWindow(wxWindow *parent, wxPrintout *printout); @@ -209,7 +209,7 @@ private: class WXDLLIMPEXP_CORE wxPrinter: public wxPrinterBase { public: - wxPrinter(wxPrintDialogData *data = (wxPrintDialogData *) NULL); + wxPrinter(wxPrintDialogData *data = NULL); virtual ~wxPrinter(); virtual wxWindow *CreateAbortWindow(wxWindow *parent, wxPrintout *printout); @@ -497,8 +497,8 @@ class WXDLLIMPEXP_CORE wxPrintPreviewBase: public wxObject { public: wxPrintPreviewBase(wxPrintout *printout, - wxPrintout *printoutForPrinting = (wxPrintout *) NULL, - wxPrintDialogData *data = (wxPrintDialogData *) NULL); + wxPrintout *printoutForPrinting = NULL, + wxPrintDialogData *data = NULL); wxPrintPreviewBase(wxPrintout *printout, wxPrintout *printoutForPrinting, wxPrintData *data); @@ -608,8 +608,8 @@ class WXDLLIMPEXP_CORE wxPrintPreview: public wxPrintPreviewBase { public: wxPrintPreview(wxPrintout *printout, - wxPrintout *printoutForPrinting = (wxPrintout *) NULL, - wxPrintDialogData *data = (wxPrintDialogData *) NULL); + wxPrintout *printoutForPrinting = NULL, + wxPrintDialogData *data = NULL); wxPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting, wxPrintData *data); diff --git a/include/wx/process.h b/include/wx/process.h index 36e7519bd8..22be173230 100644 --- a/include/wx/process.h +++ b/include/wx/process.h @@ -55,7 +55,7 @@ public: // ctors - wxProcess(wxEvtHandler *parent = (wxEvtHandler *) NULL, int nId = wxID_ANY) + wxProcess(wxEvtHandler *parent = NULL, int nId = wxID_ANY) { Init(parent, nId, wxPROCESS_DEFAULT); } wxProcess(int flags) { Init(NULL, wxID_ANY, flags); } diff --git a/include/wx/propgrid/advprops.h b/include/wx/propgrid/advprops.h index 1119081c86..9326cc40b9 100644 --- a/include/wx/propgrid/advprops.h +++ b/include/wx/propgrid/advprops.h @@ -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 diff --git a/include/wx/propgrid/editors.h b/include/wx/propgrid/editors.h index 96298e2cc5..fcb42d8bc7 100644 --- a/include/wx/propgrid/editors.h +++ b/include/wx/propgrid/editors.h @@ -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 ); \ diff --git a/include/wx/propgrid/propgrid.h b/include/wx/propgrid/propgrid.h index fefc72e3b3..e0edca337d 100644 --- a/include/wx/propgrid/propgrid.h +++ b/include/wx/propgrid/propgrid.h @@ -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 ) diff --git a/include/wx/propgrid/propgridiface.h b/include/wx/propgrid/propgridiface.h index dda25e1faf..c83dc78c9e 100644 --- a/include/wx/propgrid/propgridiface.h +++ b/include/wx/propgrid/propgridiface.h @@ -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; diff --git a/include/wx/propgrid/props.h b/include/wx/propgrid/props.h index 3d9885c041..5517f8acd9 100644 --- a/include/wx/propgrid/props.h +++ b/include/wx/propgrid/props.h @@ -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 diff --git a/include/wx/richtext/richtextbuffer.h b/include/wx/richtext/richtextbuffer.h index 740b5be4c8..798bb18832 100644 --- a/include/wx/richtext/richtextbuffer.h +++ b/include/wx/richtext/richtextbuffer.h @@ -1905,7 +1905,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextBufferDataObject: public wxDataObjectSimple public: // ctor doesn't copy the pointer, so it shouldn't go away while this object // is alive - wxRichTextBufferDataObject(wxRichTextBuffer* richTextBuffer = (wxRichTextBuffer*) NULL); + wxRichTextBufferDataObject(wxRichTextBuffer* richTextBuffer = NULL); virtual ~wxRichTextBufferDataObject(); // after a call to this function, the buffer is owned by the caller and it diff --git a/include/wx/stc/stc.h b/include/wx/stc/stc.h index 1fa34981d4..0319c79fd6 100644 --- a/include/wx/stc/stc.h +++ b/include/wx/stc/stc.h @@ -4026,34 +4026,34 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); #define wxStyledTextEventHandler( func ) \ wxEVENT_HANDLER_CAST( wxStyledTextEventFunction, func ) -#define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_HOTSPOT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_CLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_HOTSPOT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_CALLTIP_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_AUTOCOMP_SELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_SELECTION id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_INDICATOR_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_INDICATOR_CLICK id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), -#define EVT_STC_INDICATOR_RELEASE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_INDICATOR_RELEASE id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ), +#define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_HOTSPOT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_CLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_HOTSPOT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_CALLTIP_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_AUTOCOMP_SELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_SELECTION id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_INDICATOR_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_INDICATOR_CLICK id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), +#define EVT_STC_INDICATOR_RELEASE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_INDICATOR_RELEASE id, wxID_ANY, wxStyledTextEventHandler( fn ), NULL ), #endif diff --git a/include/wx/tbarbase.h b/include/wx/tbarbase.h index b0be7b0e7b..fc09d46586 100644 --- a/include/wx/tbarbase.h +++ b/include/wx/tbarbase.h @@ -60,13 +60,13 @@ public: // ctors & dtor // ------------ - wxToolBarToolBase(wxToolBarBase *tbar = (wxToolBarBase *)NULL, + wxToolBarToolBase(wxToolBarBase *tbar = NULL, int toolid = wxID_SEPARATOR, const wxString& label = wxEmptyString, const wxBitmap& bmpNormal = wxNullBitmap, const wxBitmap& bmpDisabled = wxNullBitmap, wxItemKind kind = wxITEM_NORMAL, - wxObject *clientData = (wxObject *) NULL, + wxObject *clientData = NULL, const wxString& shortHelpString = wxEmptyString, const wxString& longHelpString = wxEmptyString) : m_label(label), @@ -197,7 +197,7 @@ public: } // add tool to/remove it from a toolbar - virtual void Detach() { m_tbar = (wxToolBarBase *)NULL; } + virtual void Detach() { m_tbar = NULL; } virtual void Attach(wxToolBarBase *tbar) { m_tbar = tbar; } // these methods are only for tools of wxITEM_DROPDOWN kind (but even such diff --git a/include/wx/thread.h b/include/wx/thread.h index 0b237cb4f2..999d4f9166 100644 --- a/include/wx/thread.h +++ b/include/wx/thread.h @@ -506,7 +506,7 @@ public: // does it! // // will fill the rc pointer with the thread exit code if it's !NULL - wxThreadError Delete(ExitCode *rc = (ExitCode *)NULL); + wxThreadError Delete(ExitCode *rc = NULL); // waits for a joinable thread to finish and returns its exit code // diff --git a/include/wx/univ/choice.h b/include/wx/univ/choice.h index 3c28c5f4bd..27d3fbd022 100644 --- a/include/wx/univ/choice.h +++ b/include/wx/univ/choice.h @@ -41,7 +41,7 @@ public: bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = (wxString *) NULL, + int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr); diff --git a/include/wx/univ/menuitem.h b/include/wx/univ/menuitem.h index d515ce6d7d..70d3350e6c 100644 --- a/include/wx/univ/menuitem.h +++ b/include/wx/univ/menuitem.h @@ -20,12 +20,12 @@ class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase { public: // ctor & dtor - wxMenuItem(wxMenu *parentMenu = (wxMenu *)NULL, + wxMenuItem(wxMenu *parentMenu = NULL, int id = wxID_SEPARATOR, const wxString& name = wxEmptyString, const wxString& help = wxEmptyString, wxItemKind kind = wxITEM_NORMAL, - wxMenu *subMenu = (wxMenu *)NULL); + wxMenu *subMenu = NULL); virtual ~wxMenuItem(); // override base class virtuals to update the item appearance on screen diff --git a/include/wx/univ/renderer.h b/include/wx/univ/renderer.h index 167f94e88b..cec9197297 100644 --- a/include/wx/univ/renderer.h +++ b/include/wx/univ/renderer.h @@ -117,7 +117,7 @@ public: wxBorder border, const wxRect& rect, int flags = 0, - wxRect *rectIn = (wxRect *)NULL) = 0; + wxRect *rectIn = NULL) = 0; // draw text control border (I hate to have a separate method for this but // it is needed to accommodate GTK+) @@ -125,13 +125,13 @@ public: wxBorder border, const wxRect& rect, int flags = 0, - wxRect *rectIn = (wxRect *)NULL) = 0; + wxRect *rectIn = NULL) = 0; // draw push button border and return the rectangle left for the label virtual void DrawButtonBorder(wxDC& dc, const wxRect& rect, int flags = 0, - wxRect *rectIn = (wxRect *)NULL) = 0; + wxRect *rectIn = NULL) = 0; // draw a horizontal line virtual void DrawHorizontalLine(wxDC& dc, @@ -534,18 +534,18 @@ public: wxBorder border, const wxRect& rect, int flags = 0, - wxRect *rectIn = (wxRect *)NULL) + wxRect *rectIn = NULL) { m_renderer->DrawBorder(dc, border, rect, flags, rectIn); } virtual void DrawTextBorder(wxDC& dc, wxBorder border, const wxRect& rect, int flags = 0, - wxRect *rectIn = (wxRect *)NULL) + wxRect *rectIn = NULL) { m_renderer->DrawTextBorder(dc, border, rect, flags, rectIn); } virtual void DrawButtonBorder(wxDC& dc, const wxRect& rect, int flags = 0, - wxRect *rectIn = (wxRect *)NULL) + wxRect *rectIn = NULL) { m_renderer->DrawButtonBorder(dc, rect, flags, rectIn); } virtual void DrawFrame(wxDC& dc, const wxString& label, diff --git a/include/wx/univ/window.h b/include/wx/univ/window.h index a6c92da662..1dc43df024 100644 --- a/include/wx/univ/window.h +++ b/include/wx/univ/window.h @@ -102,7 +102,7 @@ public: virtual int GetScrollThumb(int orient) const; virtual int GetScrollRange(int orient) const; virtual void ScrollWindow(int dx, int dy, - const wxRect* rect = (wxRect *) NULL); + const wxRect* rect = NULL); // take into account the borders here virtual wxPoint GetClientAreaOrigin() const; diff --git a/include/wx/unix/fontutil.h b/include/wx/unix/fontutil.h index 47b443c822..831a812800 100644 --- a/include/wx/unix/fontutil.h +++ b/include/wx/unix/fontutil.h @@ -29,7 +29,7 @@ wxLoadQueryNearestFont(int pointSize, bool underlined, const wxString &facename, wxFontEncoding encoding, - wxString* xFontName = (wxString *)NULL); + wxString* xFontName = NULL); // returns the font specified by the given XLFD extern wxNativeFont wxLoadFont(const wxString& fontSpec); diff --git a/include/wx/utils.h b/include/wx/utils.h index 4e09746199..3d50a61ad0 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -107,8 +107,8 @@ WXDLLIMPEXP_CORE void wxInfoMessageBox(wxWindow* parent); WXDLLIMPEXP_BASE wxString wxGetOsDescription(); // Get OS version -WXDLLIMPEXP_BASE wxOperatingSystemId wxGetOsVersion(int *majorVsn = (int *) NULL, - int *minorVsn = (int *) NULL); +WXDLLIMPEXP_BASE wxOperatingSystemId wxGetOsVersion(int *majorVsn = NULL, + int *minorVsn = NULL); // Get platform endianness WXDLLIMPEXP_BASE bool wxIsPlatformLittleEndian(); @@ -587,12 +587,12 @@ WXDLLIMPEXP_CORE wxWindow* wxFindWindowAtPoint(const wxPoint& pt); // Find the window/widget with the given title or label. // Pass a parent to begin the search from, or NULL to look through // all windows. -WXDLLIMPEXP_CORE wxWindow* wxFindWindowByLabel(const wxString& title, wxWindow *parent = (wxWindow *) NULL); +WXDLLIMPEXP_CORE wxWindow* wxFindWindowByLabel(const wxString& title, wxWindow *parent = NULL); // NB: this function is obsolete, use wxWindow::FindWindowByName() instead // // Find window by name, and if that fails, by label. -WXDLLIMPEXP_CORE wxWindow* wxFindWindowByName(const wxString& name, wxWindow *parent = (wxWindow *) NULL); +WXDLLIMPEXP_CORE wxWindow* wxFindWindowByName(const wxString& name, wxWindow *parent = NULL); // ---------------------------------------------------------------------------- // Message/event queue helpers diff --git a/include/wx/validate.h b/include/wx/validate.h index 1e3f4df94c..353dc85dfe 100644 --- a/include/wx/validate.h +++ b/include/wx/validate.h @@ -44,7 +44,7 @@ public: // Another possibility is to always pass a pointer to a new validator // (so the calling code can use a copy constructor of the relevant class). virtual wxObject *Clone() const - { return (wxValidator *)NULL; } + { return NULL; } bool Copy(const wxValidator& val) { m_validatorWindow = val.m_validatorWindow; return true; } @@ -87,7 +87,7 @@ extern WXDLLIMPEXP_DATA_CORE(const wxValidator) wxDefaultValidator; // a wxValidator parameter to avoid using "#if wxUSE_VALIDATORS" // everywhere class WXDLLIMPEXP_FWD_CORE wxValidator; - #define wxDefaultValidator (*((wxValidator *)NULL)) + #define wxDefaultValidator (*(NULL)) // this macro allows to avoid warnings about unused parameters when // wxUSE_VALIDATORS == 0 diff --git a/include/wx/window.h b/include/wx/window.h index 84da1edd65..04b443a1a4 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -1037,8 +1037,8 @@ public: // font virtual void GetTextExtent(const wxString& string, int *x, int *y, - int *descent = (int *) NULL, - int *externalLeading = (int *) NULL, + int *descent = NULL, + int *externalLeading = NULL, const wxFont *theFont = (const wxFont *) NULL) const = 0; @@ -1141,7 +1141,7 @@ public: // scroll window to the specified position virtual void ScrollWindow( int dx, int dy, - const wxRect* rect = (wxRect *) NULL ) = 0; + const wxRect* rect = NULL ) = 0; // scrolls window by line/page: note that not all controls support this // @@ -1791,7 +1791,7 @@ inline void wxWindowBase::SetInitialBestSize(const wxSize& size) inline wxWindow *wxWindowBase::GetGrandParent() const { - return m_parent ? m_parent->GetParent() : (wxWindow *)NULL; + return m_parent ? m_parent->GetParent() : NULL; } // ---------------------------------------------------------------------------- diff --git a/include/wx/wizard.h b/include/wx/wizard.h index 3b65fab1d6..584aa494ab 100644 --- a/include/wx/wizard.h +++ b/include/wx/wizard.h @@ -126,16 +126,16 @@ public: // ctor takes the previous and next pages wxWizardPageSimple(wxWizard *parent, - wxWizardPage *prev = (wxWizardPage *)NULL, - wxWizardPage *next = (wxWizardPage *)NULL, + wxWizardPage *prev = NULL, + wxWizardPage *next = NULL, const wxBitmap& bitmap = wxNullBitmap) { Create(parent, prev, next, bitmap); } bool Create(wxWizard *parent = NULL, // let it be default ctor too - wxWizardPage *prev = (wxWizardPage *)NULL, - wxWizardPage *next = (wxWizardPage *)NULL, + wxWizardPage *prev = NULL, + wxWizardPage *next = NULL, const wxBitmap& bitmap = wxNullBitmap) { m_prev = prev; diff --git a/include/wx/x11/bitmap.h b/include/wx/x11/bitmap.h index fed6dd5068..2a40965b35 100644 --- a/include/wx/x11/bitmap.h +++ b/include/wx/x11/bitmap.h @@ -105,7 +105,7 @@ public: wxBitmap GetSubBitmap( const wxRect& rect ) const; - bool SaveFile( const wxString &name, wxBitmapType type, const wxPalette *palette = (wxPalette *) NULL ) const; + bool SaveFile( const wxString &name, wxBitmapType type, const wxPalette *palette = NULL ) const; bool LoadFile( const wxString &name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE ); wxPalette *GetPalette() const; diff --git a/include/wx/x11/dataobj2.h b/include/wx/x11/dataobj2.h index 6aefcebe98..b1d027439c 100644 --- a/include/wx/x11/dataobj2.h +++ b/include/wx/x11/dataobj2.h @@ -49,7 +49,7 @@ public: } protected: - void Init() { m_pngData = (void *)NULL; m_pngSize = 0; } + void Init() { m_pngData = NULL; m_pngSize = 0; } void Clear() { free(m_pngData); } void ClearAll() { Clear(); Init(); } diff --git a/include/wx/x11/nanox/X11/Xlib.h b/include/wx/x11/nanox/X11/Xlib.h index 91ef17295e..d0c299ff78 100644 --- a/include/wx/x11/nanox/X11/Xlib.h +++ b/include/wx/x11/nanox/X11/Xlib.h @@ -114,8 +114,8 @@ typedef struct { #define XFreeCursor(d, c) GrDestroyCursor(c) #define XFreeGC(d, gc) GrDestroyGC(gc) #define XSetBackground(d, gc, c) GrSetGCBackground(gc, c) -#define DefaultVisual(d, s) ((Visual*) NULL) -#define DefaultColormap(d, s) DefaultColormapOfScreen((Screen*) NULL) +#define DefaultVisual(d, s) (NULL) +#define DefaultColormap(d, s) DefaultColormapOfScreen(NULL) #define DefaultScreenOfDisplay(d) 0 #define XSetFillStyle(d, gc, s) wxNoop() #define XSetLineAttributes(d, gc, a, b, c, e) wxNoop() diff --git a/include/wx/x11/window.h b/include/wx/x11/window.h index b28d6706e5..a4353eaf9d 100644 --- a/include/wx/x11/window.h +++ b/include/wx/x11/window.h @@ -73,13 +73,13 @@ public: virtual int GetCharWidth() const; virtual void GetTextExtent(const wxString& string, int *x, int *y, - int *descent = (int *) NULL, - int *externalLeading = (int *) NULL, + int *descent = NULL, + int *externalLeading = NULL, const wxFont *theFont = (const wxFont *) NULL) const; virtual void ScrollWindow( int dx, int dy, - const wxRect* rect = (wxRect *) NULL ); + const wxRect* rect = NULL ); #if wxUSE_DRAG_AND_DROP virtual void SetDropTarget( wxDropTarget *dropTarget ); diff --git a/include/wx/xti.h b/include/wx/xti.h index 25d18e1ace..41c24517f7 100644 --- a/include/wx/xti.h +++ b/include/wx/xti.h @@ -66,7 +66,7 @@ # define wxTEMPLATED_MEMBER_CALL( method , type ) method() # define wxTEMPLATED_MEMBER_FIX( type ) #else -# define wxTEMPLATED_MEMBER_CALL( method , type ) method((type*)NULL) +# define wxTEMPLATED_MEMBER_CALL( method , type ) method(NULL) # define wxTEMPLATED_MEMBER_FIX( type ) type* =NULL #endif @@ -622,7 +622,7 @@ public: virtual wxxVariantData* Clone() const { return new wxxVariantDataT( Get() ) ; } // returns the type info of the contentc - virtual const wxTypeInfo* GetTypeInfo() const { return wxGetTypeInfo( (T*) NULL ) ; } + virtual const wxTypeInfo* GetTypeInfo() const { return wxGetTypeInfo( NULL ) ; } private: T m_data; @@ -1965,15 +1965,15 @@ private : #define IMPLEMENT_DYNAMIC_CLASS_WITH_COPY( name , basename ) \ _IMPLEMENT_DYNAMIC_CLASS_WITH_COPY( name , basename , "" , NULL ) \ _TYPEINFO_CLASSES(name, NULL , NULL) \ - const wxPropertyInfo *name::GetPropertiesStatic() { return (wxPropertyInfo*) NULL ; } \ - const wxHandlerInfo *name::GetHandlersStatic() { return (wxHandlerInfo*) NULL ; } \ + const wxPropertyInfo *name::GetPropertiesStatic() { return NULL ; } \ + const wxHandlerInfo *name::GetHandlersStatic() { return NULL ; } \ wxCONSTRUCTOR_DUMMY( name ) #define IMPLEMENT_DYNAMIC_CLASS( name , basename ) \ _IMPLEMENT_DYNAMIC_CLASS( name , basename , "" , NULL ) \ _TYPEINFO_CLASSES(name, NULL , NULL) \ - wxPropertyInfo *name::GetPropertiesStatic() { return (wxPropertyInfo*) NULL ; } \ - wxHandlerInfo *name::GetHandlersStatic() { return (wxHandlerInfo*) NULL ; } \ + wxPropertyInfo *name::GetPropertiesStatic() { return NULL ; } \ + wxHandlerInfo *name::GetHandlersStatic() { return NULL ; } \ wxCONSTRUCTOR_DUMMY( name ) #define IMPLEMENT_DYNAMIC_CLASS_XTI( name , basename , unit ) \ @@ -2032,8 +2032,8 @@ private : #define IMPLEMENT_DYNAMIC_CLASS2( name , basename , basename2) \ _IMPLEMENT_DYNAMIC_CLASS2( name , basename , basename2 , "", NULL) \ _TYPEINFO_CLASSES(name, NULL , NULL) \ - wxPropertyInfo *name::GetPropertiesStatic() { return (wxPropertyInfo*) NULL ; } \ - wxHandlerInfo *name::GetHandlersStatic() { return (wxHandlerInfo*) NULL ; } \ + wxPropertyInfo *name::GetPropertiesStatic() { return NULL ; } \ + wxHandlerInfo *name::GetHandlersStatic() { return NULL ; } \ wxCONSTRUCTOR_DUMMY( name ) #define IMPLEMENT_DYNAMIC_CLASS2_XTI( name , basename , basename2, unit) \ @@ -2061,8 +2061,8 @@ private : #define IMPLEMENT_ABSTRACT_CLASS( name , basename ) \ _IMPLEMENT_ABSTRACT_CLASS( name , basename ) \ - wxHandlerInfo *name::GetHandlersStatic() { return (wxHandlerInfo*) NULL ; } \ - wxPropertyInfo *name::GetPropertiesStatic() { return (wxPropertyInfo*) NULL ; } + wxHandlerInfo *name::GetHandlersStatic() { return NULL ; } \ + wxPropertyInfo *name::GetPropertiesStatic() { return NULL ; } // Multiple inheritance with two base classes diff --git a/src/aui/tabmdi.cpp b/src/aui/tabmdi.cpp index a4a7136da9..8a560e75ff 100644 --- a/src/aui/tabmdi.cpp +++ b/src/aui/tabmdi.cpp @@ -447,7 +447,7 @@ bool wxAuiMDIChildFrame::Create(wxAuiMDIParentFrame* parent, const wxString& name) { wxAuiMDIClientWindow* pClientWindow = parent->GetClientWindow(); - wxASSERT_MSG((pClientWindow != (wxWindow*) NULL), wxT("Missing MDI client window.")); + wxASSERT_MSG((pClientWindow != NULL), wxT("Missing MDI client window.")); // see comment in constructor if (style & wxMINIMIZE) diff --git a/src/cocoa/fontutil.cpp b/src/cocoa/fontutil.cpp index 1a59d7e8e2..b42c8ebb3f 100644 --- a/src/cocoa/fontutil.cpp +++ b/src/cocoa/fontutil.cpp @@ -179,7 +179,7 @@ bool wxGetNativeFontEncoding(wxFontEncoding encoding, // private data // ---------------------------------------------------------------------------- -static wxHashTable *g_fontHash = (wxHashTable*) NULL; +static wxHashTable *g_fontHash = NULL; // ---------------------------------------------------------------------------- // private functions @@ -251,7 +251,7 @@ void wxFontModule::OnExit() { delete g_fontHash; - g_fontHash = (wxHashTable *)NULL; + g_fontHash = NULL; } #endif diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index a358cf0dde..740deebb2b 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -243,7 +243,7 @@ int wxAppConsoleBase::OnExit() #if wxUSE_CONFIG // delete the config object if any (don't use Get() here, but Set() // because Get() could create a new config object) - delete wxConfigBase::Set((wxConfigBase *) NULL); + delete wxConfigBase::Set(NULL); #endif // wxUSE_CONFIG return 0; diff --git a/src/common/appcmn.cpp b/src/common/appcmn.cpp index af5a1d8ece..afb51d63c8 100644 --- a/src/common/appcmn.cpp +++ b/src/common/appcmn.cpp @@ -71,7 +71,7 @@ WXDLLIMPEXP_DATA_CORE(wxList) wxPendingDelete; wxAppBase::wxAppBase() { - m_topWindow = (wxWindow *)NULL; + m_topWindow = NULL; m_useBestVisual = false; m_forceTrueColour = false; diff --git a/src/common/cmdproc.cpp b/src/common/cmdproc.cpp index 259d3e0ff7..a5ddc7bed1 100644 --- a/src/common/cmdproc.cpp +++ b/src/common/cmdproc.cpp @@ -57,7 +57,7 @@ wxCommandProcessor::wxCommandProcessor(int maxCommands) { m_maxNoCommands = maxCommands; #if wxUSE_MENUS - m_commandEditMenu = (wxMenu *) NULL; + m_commandEditMenu = NULL; #endif // wxUSE_MENUS m_undoAccelerator = wxT("\tCtrl+Z"); m_redoAccelerator = wxT("\tCtrl+Y"); @@ -164,7 +164,7 @@ bool wxCommandProcessor::Undo() bool wxCommandProcessor::Redo() { - wxCommand *redoCommand = (wxCommand *) NULL; + wxCommand *redoCommand = NULL; wxList::compatibility_iterator redoNode #if !wxUSE_STL = NULL // just to avoid warnings diff --git a/src/common/cmndata.cpp b/src/common/cmndata.cpp index 4a02c49298..2fd075f47e 100644 --- a/src/common/cmndata.cpp +++ b/src/common/cmndata.cpp @@ -504,7 +504,7 @@ void wxPageSetupDialogData::SetPrintData(const wxPrintData& printData) // paper id void wxPageSetupDialogData::CalculateIdFromPaperSize() { - wxASSERT_MSG( (wxThePrintPaperDatabase != (wxPrintPaperDatabase*) NULL), + wxASSERT_MSG( (wxThePrintPaperDatabase != NULL), wxT("wxThePrintPaperDatabase should not be NULL. Do not create global print dialog data objects.") ); wxSize sz = GetPaperSize(); @@ -519,7 +519,7 @@ void wxPageSetupDialogData::CalculateIdFromPaperSize() // Use paper id in wxPrintData to set this object's paper size void wxPageSetupDialogData::CalculatePaperSizeFromId() { - wxASSERT_MSG( (wxThePrintPaperDatabase != (wxPrintPaperDatabase*) NULL), + wxASSERT_MSG( (wxThePrintPaperDatabase != NULL), wxT("wxThePrintPaperDatabase should not be NULL. Do not create global print dialog data objects.") ); wxSize sz = wxThePrintPaperDatabase->GetSize(m_printData.GetPaperId()); diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index 8874d1873a..89367d068b 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -757,18 +757,18 @@ IMPLEMENT_ABSTRACT_CLASS(wxComboCtrlBase, wxControl) void wxComboCtrlBase::Init() { - m_winPopup = (wxWindow *)NULL; - m_popup = (wxWindow *)NULL; + m_winPopup = NULL; + m_popup = NULL; m_popupWinState = Hidden; - m_btn = (wxWindow*) NULL; - m_text = (wxTextCtrl*) NULL; - m_popupInterface = (wxComboPopup*) NULL; + m_btn = NULL; + m_text = NULL; + m_popupInterface = NULL; - m_popupExtraHandler = (wxEvtHandler*) NULL; - m_textEvtHandler = (wxEvtHandler*) NULL; + m_popupExtraHandler = NULL; + m_textEvtHandler = NULL; #if INSTALL_TOPLEV_HANDLER - m_toplevEvtHandler = (wxEvtHandler*) NULL; + m_toplevEvtHandler = NULL; #endif m_mainCtrlWnd = this; @@ -892,7 +892,7 @@ wxComboCtrlBase::~wxComboCtrlBase() #if INSTALL_TOPLEV_HANDLER delete ((wxComboFrameEventHandler*)m_toplevEvtHandler); - m_toplevEvtHandler = (wxEvtHandler*) NULL; + m_toplevEvtHandler = NULL; #endif DestroyPopup(); @@ -1222,8 +1222,8 @@ void wxComboCtrlBase::DoSetToolTip(wxToolTip *tooltip) } else { - if ( m_text ) m_text->SetToolTip( (wxToolTip*) NULL ); - if ( m_btn ) m_btn->SetToolTip( (wxToolTip*) NULL ); + if ( m_text ) m_text->SetToolTip( NULL ); + if ( m_btn ) m_btn->SetToolTip( NULL ); } } #endif // wxUSE_TOOLTIPS @@ -1788,10 +1788,10 @@ void wxComboCtrlBase::DestroyPopup() m_winPopup->Destroy(); } - m_popupExtraHandler = (wxEvtHandler*) NULL; - m_popupInterface = (wxComboPopup*) NULL; - m_winPopup = (wxWindow*) NULL; - m_popup = (wxWindow*) NULL; + m_popupExtraHandler = NULL; + m_popupInterface = NULL; + m_winPopup = NULL; + m_popup = NULL; } void wxComboCtrlBase::DoSetPopupControl(wxComboPopup* iface) @@ -1811,7 +1811,7 @@ void wxComboCtrlBase::DoSetPopupControl(wxComboPopup* iface) } else { - m_popup = (wxWindow*) NULL; + m_popup = NULL; } // This must be done after creation diff --git a/src/common/containr.cpp b/src/common/containr.cpp index 06ada8e7a2..b79bf180b1 100644 --- a/src/common/containr.cpp +++ b/src/common/containr.cpp @@ -398,7 +398,7 @@ void wxControlContainer::HandleOnNavigationKey( wxNavigationKeyEvent& event ) { // just to be sure it's not used (normally this is not necessary, but // doesn't hurt neither) - m_winLastFocused = (wxWindow *)NULL; + m_winLastFocused = NULL; // start from first or last depending on where we're going node = forward ? children.GetFirst() : children.GetLast(); @@ -662,7 +662,7 @@ bool wxSetFocusToChild(wxWindow *win, wxWindow **childLastFocused) else { // it doesn't count as such any more - *childLastFocused = (wxWindow *)NULL; + *childLastFocused = NULL; } } diff --git a/src/common/cshelp.cpp b/src/common/cshelp.cpp index 4a02253a00..de5c452177 100644 --- a/src/common/cshelp.cpp +++ b/src/common/cshelp.cpp @@ -303,7 +303,7 @@ void wxContextHelpButton::OnContextHelp(wxCommandEvent& WXUNUSED(event)) // wxHelpProvider // ---------------------------------------------------------------------------- -wxHelpProvider *wxHelpProvider::ms_helpProvider = (wxHelpProvider *)NULL; +wxHelpProvider *wxHelpProvider::ms_helpProvider = NULL; // trivial implementation of some methods which we don't want to make pure // virtual for convenience diff --git a/src/common/dobjcmn.cpp b/src/common/dobjcmn.cpp index d9327709c5..df021af849 100644 --- a/src/common/dobjcmn.cpp +++ b/src/common/dobjcmn.cpp @@ -109,7 +109,7 @@ wxDataObjectComposite::GetObject(const wxDataFormat& format) const node = node->GetNext(); } - return (wxDataObjectSimple *)NULL; + return NULL; } void wxDataObjectComposite::Add(wxDataObjectSimple *dataObject, bool preferred) @@ -449,7 +449,7 @@ void wxCustomDataObject::Free() { delete [] (char*)m_data; m_size = 0; - m_data = (void*)NULL; + m_data = NULL; } size_t wxCustomDataObject::GetDataSize() const diff --git a/src/common/docmdi.cpp b/src/common/docmdi.cpp index 72930bbaaf..cca56168cb 100644 --- a/src/common/docmdi.cpp +++ b/src/common/docmdi.cpp @@ -97,8 +97,8 @@ END_EVENT_TABLE() void wxDocMDIChildFrame::Init() { - m_childDocument = (wxDocument*) NULL; - m_childView = (wxView*) NULL; + m_childDocument = NULL; + m_childView = NULL; } wxDocMDIChildFrame::wxDocMDIChildFrame() @@ -130,7 +130,7 @@ bool wxDocMDIChildFrame::Create(wxDocument *doc, wxView *view, wxMDIParentFrame wxDocMDIChildFrame::~wxDocMDIChildFrame(void) { - m_childView = (wxView *) NULL; + m_childView = NULL; } bool wxDocMDIChildFrame::TryValidator(wxEvent& event) @@ -160,8 +160,8 @@ void wxDocMDIChildFrame::OnCloseWindow(wxCloseEvent& event) { m_childView->Activate(false); delete m_childView; - m_childView = (wxView *) NULL; - m_childDocument = (wxDocument *) NULL; + m_childView = NULL; + m_childDocument = NULL; this->Destroy(); } diff --git a/src/common/dynarray.cpp b/src/common/dynarray.cpp index 76cff5323e..52e2e8ca1d 100644 --- a/src/common/dynarray.cpp +++ b/src/common/dynarray.cpp @@ -87,7 +87,7 @@ name::name() \ { \ m_nSize = \ m_nCount = 0; \ - m_pItems = (T *)NULL; \ + m_pItems = NULL; \ } \ \ /* copy ctor */ \ @@ -107,7 +107,7 @@ name::name(const name& src) \ } \ } \ else \ - m_pItems = (T *) NULL; \ + m_pItems = NULL; \ } \ \ /* assignment operator */ \ @@ -129,7 +129,7 @@ name& name::operator=(const name& src) \ } \ } \ else \ - m_pItems = (T *) NULL; \ + m_pItems = NULL; \ \ return *this; \ } \ diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 51390ae725..322f7c16c6 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -482,7 +482,7 @@ wxString wxRealPath(const wxString& path) wxChar *wxCopyAbsolutePath(const wxString& filename) { if (filename.empty()) - return (wxChar *) NULL; + return NULL; if (! wxIsAbsolutePath(wxExpandPath(wxFileFunctionsBuffer, filename))) { @@ -715,7 +715,7 @@ wxContractPath (const wxString& filename, static wxChar dest[_MAXPATHLEN]; if (filename.empty()) - return (wxChar *) NULL; + return NULL; wxStrcpy (dest, filename); #ifdef __WXMSW__ @@ -828,7 +828,7 @@ wxPathOnly (wxChar *path) } #endif } - return (wxChar *) NULL; + return NULL; } // Return just the directory, or NULL if no directory diff --git a/src/common/filesys.cpp b/src/common/filesys.cpp index 1e6cf4880a..0eb5d8ef5e 100644 --- a/src/common/filesys.cpp +++ b/src/common/filesys.cpp @@ -244,7 +244,7 @@ wxFSFile* wxLocalFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& wxString fullpath = ms_root + fn.GetFullPath(); if (!wxFileExists(fullpath)) - return (wxFSFile*) NULL; + return NULL; // we need to check whether we can really read from this file, otherwise // wxFSFile is not going to work @@ -258,7 +258,7 @@ wxFSFile* wxLocalFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& if ( !is->Ok() ) { delete is; - return (wxFSFile*) NULL; + return NULL; } return new wxFSFile(is, diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp index 206c959dfb..baab1cfa3e 100644 --- a/src/common/framecmn.cpp +++ b/src/common/framecmn.cpp @@ -95,7 +95,7 @@ void wxFrameBase::DeleteAllBars() if ( m_frameMenuBar ) { delete m_frameMenuBar; - m_frameMenuBar = (wxMenuBar *) NULL; + m_frameMenuBar = NULL; } #endif // wxUSE_MENUS @@ -103,7 +103,7 @@ void wxFrameBase::DeleteAllBars() if ( m_frameStatusBar ) { delete m_frameStatusBar; - m_frameStatusBar = (wxStatusBar *) NULL; + m_frameStatusBar = NULL; } #endif // wxUSE_STATUSBAR @@ -111,7 +111,7 @@ void wxFrameBase::DeleteAllBars() if ( m_frameToolBar ) { delete m_frameToolBar; - m_frameToolBar = (wxToolBar *) NULL; + m_frameToolBar = NULL; } #endif // wxUSE_TOOLBAR } @@ -293,7 +293,7 @@ wxStatusBar* wxFrameBase::CreateStatusBar(int number, { // the main status bar can only be created once (or else it should be // deleted before calling CreateStatusBar() again) - wxCHECK_MSG( !m_frameStatusBar, (wxStatusBar *)NULL, + wxCHECK_MSG( !m_frameStatusBar, NULL, wxT("recreating status bar in wxFrame") ); SetStatusBar(OnCreateStatusBar(number, style, id, name)); @@ -448,7 +448,7 @@ wxToolBar* wxFrameBase::CreateToolBar(long style, { // the main toolbar can't be recreated (unless it was explicitly deleted // before) - wxCHECK_MSG( !m_frameToolBar, (wxToolBar *)NULL, + wxCHECK_MSG( !m_frameToolBar, NULL, wxT("recreating toolbar in wxFrame") ); if ( style == -1 ) diff --git a/src/common/fs_inet.cpp b/src/common/fs_inet.cpp index 835cf15a7e..2ed1f2e865 100644 --- a/src/common/fs_inet.cpp +++ b/src/common/fs_inet.cpp @@ -129,7 +129,7 @@ wxFSFile* wxInternetFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), } } - return (wxFSFile*) NULL; // incorrect URL + return NULL; // incorrect URL #endif } diff --git a/src/common/gbsizer.cpp b/src/common/gbsizer.cpp index eb23a2e372..3a14dd4aa7 100644 --- a/src/common/gbsizer.cpp +++ b/src/common/gbsizer.cpp @@ -187,7 +187,7 @@ wxSizerItem* wxGridBagSizer::Add( wxWindow *window, else { delete item; - return (wxSizerItem*)NULL; + return NULL; } } @@ -201,7 +201,7 @@ wxSizerItem* wxGridBagSizer::Add( wxSizer *sizer, else { delete item; - return (wxSizerItem*)NULL; + return NULL; } } @@ -215,7 +215,7 @@ wxSizerItem* wxGridBagSizer::Add( int width, int height, else { delete item; - return (wxSizerItem*)NULL; + return NULL; } } @@ -741,56 +741,56 @@ wxSizerItem* wxGridBagSizer::Add( int width, int height, int, int flag, int bord wxSizerItem* wxGridBagSizer::Add( wxSizerItem * ) { wxFAIL_MSG(wxT("Invalid Add form called.")); - return (wxSizerItem*)NULL; + return NULL; } wxSizerItem* wxGridBagSizer::Prepend( wxWindow *, int, int, int, wxObject* ) { wxFAIL_MSG(wxT("Prepend should not be used with wxGridBagSizer.")); - return (wxSizerItem*)NULL; + return NULL; } wxSizerItem* wxGridBagSizer::Prepend( wxSizer *, int, int, int, wxObject* ) { wxFAIL_MSG(wxT("Prepend should not be used with wxGridBagSizer.")); - return (wxSizerItem*)NULL; + return NULL; } wxSizerItem* wxGridBagSizer::Prepend( int, int, int, int, int, wxObject* ) { wxFAIL_MSG(wxT("Prepend should not be used with wxGridBagSizer.")); - return (wxSizerItem*)NULL; + return NULL; } wxSizerItem* wxGridBagSizer::Prepend( wxSizerItem * ) { wxFAIL_MSG(wxT("Prepend should not be used with wxGridBagSizer.")); - return (wxSizerItem*)NULL; + return NULL; } wxSizerItem* wxGridBagSizer::Insert( size_t, wxWindow *, int, int, int, wxObject* ) { wxFAIL_MSG(wxT("Insert should not be used with wxGridBagSizer.")); - return (wxSizerItem*)NULL; + return NULL; } wxSizerItem* wxGridBagSizer::Insert( size_t, wxSizer *, int, int, int, wxObject* ) { wxFAIL_MSG(wxT("Insert should not be used with wxGridBagSizer.")); - return (wxSizerItem*)NULL; + return NULL; } wxSizerItem* wxGridBagSizer::Insert( size_t, int, int, int, int, int, wxObject* ) { wxFAIL_MSG(wxT("Insert should not be used with wxGridBagSizer.")); - return (wxSizerItem*)NULL; + return NULL; } wxSizerItem* wxGridBagSizer::Insert( size_t, wxSizerItem * ) { wxFAIL_MSG(wxT("Insert should not be used with wxGridBagSizer.")); - return (wxSizerItem*)NULL; + return NULL; } diff --git a/src/common/imagpng.cpp b/src/common/imagpng.cpp index 44c21654ec..2ffb924bf9 100644 --- a/src/common/imagpng.cpp +++ b/src/common/imagpng.cpp @@ -538,7 +538,7 @@ wxPNGHandler::LoadFile(wxImage *image, goto error; png_read_info( png_ptr, info_ptr ); - png_get_IHDR( png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type, (int*) NULL, (int*) NULL ); + png_get_IHDR( png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type, NULL, NULL ); if (color_type == PNG_COLOR_TYPE_PALETTE) png_set_expand( png_ptr ); diff --git a/src/common/intl.cpp b/src/common/intl.cpp index e7ca00816f..d0a11eac2f 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -2200,7 +2200,7 @@ wxString wxLocale::GetSystemEncodingName() // the environment variables (in most cases this won't work, but I was // out of ideas) char *lang = getenv( "LC_ALL"); - char *dot = lang ? strchr(lang, '.') : (char *)NULL; + char *dot = lang ? strchr(lang, '.') : NULL; if (!dot) { lang = getenv( "LC_CTYPE" ); diff --git a/src/common/layout.cpp b/src/common/layout.cpp index 710ff2223e..d479f3476e 100644 --- a/src/common/layout.cpp +++ b/src/common/layout.cpp @@ -75,7 +75,7 @@ wxIndividualLayoutConstraint::wxIndividualLayoutConstraint() percent = 0; otherEdge = wxTop; done = false; - otherWin = (wxWindowBase *) NULL; + otherWin = NULL; } void wxIndividualLayoutConstraint::Set(wxRelationship rel, wxWindowBase *otherW, wxEdge otherE, int val, int marg) @@ -158,7 +158,7 @@ bool wxIndividualLayoutConstraint::ResetIfWin(wxWindowBase *otherW) value = 0; percent = 0; otherEdge = wxTop; - otherWin = (wxWindowBase *) NULL; + otherWin = NULL; return true; } diff --git a/src/common/list.cpp b/src/common/list.cpp index 15535b3552..dcfb1b3358 100644 --- a/src/common/list.cpp +++ b/src/common/list.cpp @@ -141,7 +141,7 @@ int wxNodeBase::IndexOf() const void wxListBase::Init(wxKeyType keyType) { m_nodeFirst = - m_nodeLast = (wxNodeBase *) NULL; + m_nodeLast = NULL; m_count = 0; m_destroy = false; m_keyType = keyType; @@ -165,7 +165,7 @@ void wxListBase::DoCopy(const wxListBase& list) m_destroy = list.m_destroy; m_keyType = list.m_keyType; m_nodeFirst = - m_nodeLast = (wxNodeBase *) NULL; + m_nodeLast = NULL; switch (m_keyType) { @@ -236,12 +236,12 @@ wxNodeBase *wxListBase::AppendCommon(wxNodeBase *node) wxNodeBase *wxListBase::Append(void *object) { // all objects in a keyed list should have a key - wxCHECK_MSG( m_keyType == wxKEY_NONE, (wxNodeBase *)NULL, + wxCHECK_MSG( m_keyType == wxKEY_NONE, NULL, wxT("need a key for the object to append") ); // we use wxDefaultListKey even though it is the default parameter value // because gcc under Mac OS X seems to miscompile this call otherwise - wxNodeBase *node = CreateNode(m_nodeLast, (wxNodeBase *)NULL, object, + wxNodeBase *node = CreateNode(m_nodeLast, NULL, object, wxDefaultListKey); return AppendCommon(node); @@ -251,10 +251,10 @@ wxNodeBase *wxListBase::Append(long key, void *object) { wxCHECK_MSG( (m_keyType == wxKEY_INTEGER) || (m_keyType == wxKEY_NONE && m_count == 0), - (wxNodeBase *)NULL, + NULL, wxT("can't append object with numeric key to this list") ); - wxNodeBase *node = CreateNode(m_nodeLast, (wxNodeBase *)NULL, object, key); + wxNodeBase *node = CreateNode(m_nodeLast, NULL, object, key); return AppendCommon(node); } @@ -262,20 +262,20 @@ wxNodeBase *wxListBase::Append (const wxString& key, void *object) { wxCHECK_MSG( (m_keyType == wxKEY_STRING) || (m_keyType == wxKEY_NONE && m_count == 0), - (wxNodeBase *)NULL, + NULL, wxT("can't append object with string key to this list") ); - wxNodeBase *node = CreateNode(m_nodeLast, (wxNodeBase *)NULL, object, key); + wxNodeBase *node = CreateNode(m_nodeLast, NULL, object, key); return AppendCommon(node); } wxNodeBase *wxListBase::Insert(wxNodeBase *position, void *object) { // all objects in a keyed list should have a key - wxCHECK_MSG( m_keyType == wxKEY_NONE, (wxNodeBase *)NULL, + wxCHECK_MSG( m_keyType == wxKEY_NONE, NULL, wxT("need a key for the object to insert") ); - wxCHECK_MSG( !position || position->m_list == this, (wxNodeBase *)NULL, + wxCHECK_MSG( !position || position->m_list == this, NULL, wxT("can't insert before a node from another list") ); // previous and next node for the node being inserted @@ -288,7 +288,7 @@ wxNodeBase *wxListBase::Insert(wxNodeBase *position, void *object) else { // inserting in the beginning of the list - prev = (wxNodeBase *)NULL; + prev = NULL; next = m_nodeFirst; } @@ -321,7 +321,7 @@ wxNodeBase *wxListBase::Item(size_t n) const wxFAIL_MSG( wxT("invalid index in wxListBase::Item") ); - return (wxNodeBase *)NULL; + return NULL; } wxNodeBase *wxListBase::Find(const wxListKey& key) const @@ -338,7 +338,7 @@ wxNodeBase *wxListBase::Find(const wxListKey& key) const } // not found - return (wxNodeBase *)NULL; + return NULL; } wxNodeBase *wxListBase::Find(const void *object) const @@ -350,7 +350,7 @@ wxNodeBase *wxListBase::Find(const void *object) const } // not found - return (wxNodeBase *)NULL; + return NULL; } int wxListBase::IndexOf(void *object) const @@ -437,7 +437,7 @@ void wxListBase::Clear() } m_nodeFirst = - m_nodeLast = (wxNodeBase *)NULL; + m_nodeLast = NULL; m_count = 0; } @@ -458,7 +458,7 @@ void *wxListBase::FirstThat(wxListIterateFunction F) return current->GetData(); } - return (wxNodeBase *)NULL; + return NULL; } void *wxListBase::LastThat(wxListIterateFunction F) @@ -469,7 +469,7 @@ void *wxListBase::LastThat(wxListIterateFunction F) return current->GetData(); } - return (wxNodeBase *)NULL; + return NULL; } // (stefan.hammes@urz.uni-heidelberg.de) diff --git a/src/common/log.cpp b/src/common/log.cpp index 9e64eaa9b8..9f4134f41b 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -969,7 +969,7 @@ unsigned int wxLog::ms_prevCounter = 0; time_t wxLog::ms_prevTimeStamp= 0; wxLogLevel wxLog::ms_prevLevel; -wxLog *wxLog::ms_pLogger = (wxLog *)NULL; +wxLog *wxLog::ms_pLogger = NULL; bool wxLog::ms_doLog = true; bool wxLog::ms_bAutoCreate = true; bool wxLog::ms_bVerbose = false; diff --git a/src/common/memory.cpp b/src/common/memory.cpp index a1728fca67..993b39a7a9 100644 --- a/src/common/memory.cpp +++ b/src/common/memory.cpp @@ -576,7 +576,7 @@ void wxDebugContext::TraverseList (PmSFV func, wxMemStruct *from) bool wxDebugContext::PrintList (void) { #ifdef __WXDEBUG__ - TraverseList ((PmSFV)&wxMemStruct::PrintNode, (checkPoint ? checkPoint->m_next : (wxMemStruct*)NULL)); + TraverseList ((PmSFV)&wxMemStruct::PrintNode, (checkPoint ? checkPoint->m_next : NULL)); return true; #else @@ -602,7 +602,7 @@ bool wxDebugContext::Dump(void) } } - TraverseList ((PmSFV)&wxMemStruct::Dump, (checkPoint ? checkPoint->m_next : (wxMemStruct*)NULL)); + TraverseList ((PmSFV)&wxMemStruct::Dump, (checkPoint ? checkPoint->m_next : NULL)); OutputDumpLine(wxEmptyString); OutputDumpLine(wxEmptyString); @@ -667,7 +667,7 @@ bool wxDebugContext::PrintStatistics(bool detailed) wxDebugStatsStruct *list = NULL; - wxMemStruct *from = (checkPoint ? checkPoint->m_next : (wxMemStruct*)NULL ); + wxMemStruct *from = (checkPoint ? checkPoint->m_next : NULL ); if (!from) from = wxDebugContext::GetHead (); @@ -800,7 +800,7 @@ int wxDebugContext::Check(bool checkAll) { int nFailures = 0; - wxMemStruct *from = (checkPoint ? checkPoint->m_next : (wxMemStruct*)NULL ); + wxMemStruct *from = (checkPoint ? checkPoint->m_next : NULL ); if (!from || checkAll) from = wxDebugContext::GetHead (); diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index 37c0c127f1..9e5d1e8715 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -148,12 +148,12 @@ bool wxMenuBase::ms_locked = true; void wxMenuBase::Init(long style) { - m_menuBar = (wxMenuBar *)NULL; - m_menuParent = (wxMenu *)NULL; + m_menuBar = NULL; + m_menuParent = NULL; - m_invokingWindow = (wxWindow *)NULL; + m_invokingWindow = NULL; m_style = style; - m_clientData = (void *)NULL; + m_clientData = NULL; m_eventHandler = this; } @@ -240,11 +240,11 @@ wxMenuItem *wxMenuBase::DoRemove(wxMenuItem *item) m_items.Erase(node); // item isn't attached to anything any more - item->SetMenu((wxMenu *)NULL); + item->SetMenu(NULL); wxMenu *submenu = item->GetSubMenu(); if ( submenu ) { - submenu->SetParent((wxMenu *)NULL); + submenu->SetParent(NULL); if ( submenu->IsAttached() ) submenu->Detach(); } @@ -265,7 +265,7 @@ bool wxMenuBase::DoDelete(wxMenuItem *item) wxCHECK_MSG( item2, false, wxT("failed to delete menu item") ); // don't delete the submenu - item2->SetSubMenu((wxMenu *)NULL); + item2->SetSubMenu(NULL); delete item2; @@ -356,7 +356,7 @@ wxMenuItem *wxMenuBase::FindItem(int itemId, wxMenu **itemMenu) const // non recursive search wxMenuItem *wxMenuBase::FindChildItem(int id, size_t *ppos) const { - wxMenuItem *item = (wxMenuItem *)NULL; + wxMenuItem *item = NULL; wxMenuItemList::compatibility_iterator node = GetMenuItems().GetFirst(); size_t pos; diff --git a/src/common/object.cpp b/src/common/object.cpp index 67e60c8551..c6e4f241a8 100644 --- a/src/common/object.cpp +++ b/src/common/object.cpp @@ -53,7 +53,7 @@ const wxClassInfo* wxObject::ms_classParents[] = { NULL } ; wxClassInfo wxObject::ms_classInfo(ms_classParents , wxEmptyString , wxT("wxObject"), (int) sizeof(wxObject), \ (wxObjectConstructorFn) 0 , - (wxPropertyInfo*) NULL,(wxHandlerInfo*) NULL,0 , 0 , + NULL,NULL,0 , 0 , 0 , wxVariantOfPtrToObjectConverterwxObject , wxVariantToObjectConverterwxObject , wxObjectToVariantConverterwxObject); template<> void wxStringReadValue(const wxString & , wxObject * & ){assert(0) ;} template<> void wxStringWriteValue(wxString & , wxObject* const & ){assert(0) ;} diff --git a/src/common/paper.cpp b/src/common/paper.cpp index bc29b2acc1..18587e9b53 100644 --- a/src/common/paper.cpp +++ b/src/common/paper.cpp @@ -79,7 +79,7 @@ WX_DECLARE_LIST(wxPrintPaperType, wxPrintPaperTypeList); #include "wx/listimpl.cpp" WX_DEFINE_LIST(wxPrintPaperTypeList) -wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase*) NULL; +wxPrintPaperDatabase* wxThePrintPaperDatabase = NULL; wxPrintPaperDatabase::wxPrintPaperDatabase() { diff --git a/src/common/popupcmn.cpp b/src/common/popupcmn.cpp index 9347bd3432..1638ce5760 100644 --- a/src/common/popupcmn.cpp +++ b/src/common/popupcmn.cpp @@ -185,7 +185,7 @@ void wxPopupWindowBase::Position(const wxPoint& ptOrigin, void wxPopupTransientWindow::Init() { m_child = - m_focus = (wxWindow *)NULL; + m_focus = NULL; m_handlerFocus = NULL; m_handlerPopup = NULL; @@ -330,8 +330,8 @@ bool wxPopupTransientWindow::Show( bool show ) GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_POINTER_MOTION_MASK), - (GdkWindow *) NULL, - (GdkCursor *) NULL, + NULL, + NULL, (guint32)GDK_CURRENT_TIME ); } #endif diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 3f767ded96..d4aa30278a 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -303,15 +303,15 @@ IMPLEMENT_CLASS(wxPrinterBase, wxObject) wxPrinterBase::wxPrinterBase(wxPrintDialogData *data) { - m_currentPrintout = (wxPrintout *) NULL; - sm_abortWindow = (wxWindow *) NULL; + m_currentPrintout = NULL; + sm_abortWindow = NULL; sm_abortIt = false; if (data) m_printDialogData = (*data); sm_lastError = wxPRINTER_NO_ERROR; } -wxWindow *wxPrinterBase::sm_abortWindow = (wxWindow *) NULL; +wxWindow *wxPrinterBase::sm_abortWindow = NULL; bool wxPrinterBase::sm_abortIt = false; wxPrinterError wxPrinterBase::sm_lastError = wxPRINTER_NO_ERROR; @@ -513,7 +513,7 @@ void wxPrintAbortDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) wxPrinterBase::sm_abortWindow->Show(false); wxPrinterBase::sm_abortWindow->Close(true); wxPrinterBase::sm_abortWindow->Destroy(); - wxPrinterBase::sm_abortWindow = (wxWindow *) NULL; + wxPrinterBase::sm_abortWindow = NULL; } //---------------------------------------------------------------------------- @@ -525,7 +525,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxPrintout, wxObject) wxPrintout::wxPrintout(const wxString& title) { m_printoutTitle = title ; - m_printoutDC = (wxDC *) NULL; + m_printoutDC = NULL; m_pageWidthMM = 0; m_pageHeightMM = 0; m_pageWidthPixels = 0; @@ -1001,11 +1001,11 @@ wxPreviewControlBar::wxPreviewControlBar(wxPrintPreviewBase *preview, long butto wxPanel(parent, wxID_ANY, pos, size, style, name) { m_printPreview = preview; - m_closeButton = (wxButton *) NULL; - m_nextPageButton = (wxButton *) NULL; - m_previousPageButton = (wxButton *) NULL; - m_printButton = (wxButton *) NULL; - m_zoomControl = (wxChoice *) NULL; + m_closeButton = NULL; + m_nextPageButton = NULL; + m_previousPageButton = NULL; + m_printButton = NULL; + m_zoomControl = NULL; m_buttonFlags = buttons; } diff --git a/src/common/tbarbase.cpp b/src/common/tbarbase.cpp index 8d07da7930..1b7d9d0068 100644 --- a/src/common/tbarbase.cpp +++ b/src/common/tbarbase.cpp @@ -177,7 +177,7 @@ wxToolBarToolBase *wxToolBarBase::InsertTool(size_t pos, const wxString& longHelp, wxObject *clientData) { - wxCHECK_MSG( pos <= GetToolsCount(), (wxToolBarToolBase *)NULL, + wxCHECK_MSG( pos <= GetToolsCount(), NULL, _T("invalid position in wxToolBar::InsertTool()") ); wxToolBarToolBase *tool = CreateTool(id, label, bitmap, bmpDisabled, kind, @@ -201,7 +201,7 @@ wxToolBarToolBase *wxToolBarBase::AddTool(wxToolBarToolBase *tool) wxToolBarToolBase * wxToolBarBase::InsertTool(size_t pos, wxToolBarToolBase *tool) { - wxCHECK_MSG( pos <= GetToolsCount(), (wxToolBarToolBase *)NULL, + wxCHECK_MSG( pos <= GetToolsCount(), NULL, _T("invalid position in wxToolBar::InsertTool()") ); if ( !tool || !DoInsertTool(pos, tool) ) @@ -226,13 +226,13 @@ wxToolBarBase::InsertControl(size_t pos, wxControl *control, const wxString& label) { - wxCHECK_MSG( control, (wxToolBarToolBase *)NULL, + wxCHECK_MSG( control, NULL, _T("toolbar: can't insert NULL control") ); - wxCHECK_MSG( control->GetParent() == this, (wxToolBarToolBase *)NULL, + wxCHECK_MSG( control->GetParent() == this, NULL, _T("control must have toolbar as parent") ); - wxCHECK_MSG( pos <= GetToolsCount(), (wxToolBarToolBase *)NULL, + wxCHECK_MSG( pos <= GetToolsCount(), NULL, _T("invalid position in wxToolBar::InsertControl()") ); wxToolBarToolBase *tool = CreateTool(control, label); @@ -280,13 +280,13 @@ wxToolBarToolBase *wxToolBarBase::AddSeparator() wxToolBarToolBase *wxToolBarBase::InsertSeparator(size_t pos) { - wxCHECK_MSG( pos <= GetToolsCount(), (wxToolBarToolBase *)NULL, + wxCHECK_MSG( pos <= GetToolsCount(), NULL, _T("invalid position in wxToolBar::InsertSeparator()") ); wxToolBarToolBase *tool = CreateTool(wxID_SEPARATOR, wxEmptyString, wxNullBitmap, wxNullBitmap, - wxITEM_SEPARATOR, (wxObject *)NULL, + wxITEM_SEPARATOR, NULL, wxEmptyString, wxEmptyString); if ( !tool || !DoInsertTool(pos, tool) ) @@ -376,7 +376,7 @@ bool wxToolBarBase::DeleteTool(int id) wxToolBarToolBase *wxToolBarBase::FindById(int id) const { - wxToolBarToolBase *tool = (wxToolBarToolBase *)NULL; + wxToolBarToolBase *tool = NULL; for ( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst(); node; @@ -527,7 +527,7 @@ wxObject *wxToolBarBase::GetToolClientData(int id) const { wxToolBarToolBase *tool = FindById(id); - return tool ? tool->GetClientData() : (wxObject *)NULL; + return tool ? tool->GetClientData() : NULL; } void wxToolBarBase::SetToolClientData(int id, wxObject *clientData) diff --git a/src/common/toplvcmn.cpp b/src/common/toplvcmn.cpp index d33262d20e..9a6688dd4e 100644 --- a/src/common/toplvcmn.cpp +++ b/src/common/toplvcmn.cpp @@ -377,7 +377,7 @@ void wxTopLevelWindowBase::DoLayout() else { // do we have _exactly_ one child? - wxWindow *child = (wxWindow *)NULL; + wxWindow *child = NULL; for ( wxWindowList::compatibility_iterator node = GetChildren().GetFirst(); node; node = node->GetNext() ) diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 4457a14ebe..2b6fda7586 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -182,7 +182,7 @@ wxString wxNow() return wxEmptyString; #endif #else - time_t now = time((time_t *) NULL); + time_t now = time(NULL); char *date = ctime(&now); date[24] = '\0'; return wxString::FromAscii(date); diff --git a/src/common/validate.cpp b/src/common/validate.cpp index 787d99bd5f..cbd48bdc80 100644 --- a/src/common/validate.cpp +++ b/src/common/validate.cpp @@ -34,7 +34,7 @@ bool wxValidator::ms_isSilent = false; wxValidator::wxValidator() { - m_validatorWindow = (wxWindow *) NULL; + m_validatorWindow = NULL; } wxValidator::~wxValidator() diff --git a/src/common/variant.cpp b/src/common/variant.cpp index 2b952944b1..6d67625a5f 100644 --- a/src/common/variant.cpp +++ b/src/common/variant.cpp @@ -63,12 +63,12 @@ IMPLEMENT_DYNAMIC_CLASS(wxVariant, wxObject) wxVariant::wxVariant() { - m_data = (wxVariantData*) NULL; + m_data = NULL; } bool wxVariant::IsNull() const { - return (m_data == (wxVariantData*) NULL); + return (m_data == NULL); } void wxVariant::MakeNull() @@ -84,7 +84,7 @@ void wxVariant::Clear() wxVariant::wxVariant(const wxVariant& variant) : wxObject() { - m_data = (wxVariantData*) NULL; + m_data = NULL; if (!variant.IsNull()) Ref(variant); diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index a519ffd7f0..57a451efd5 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -125,7 +125,7 @@ END_EVENT_TABLE() wxWindowBase::wxWindowBase() { // no window yet, no parent nor children - m_parent = (wxWindow *)NULL; + m_parent = NULL; m_windowId = wxID_ANY; // no constraints on the minimal window size @@ -146,7 +146,7 @@ wxWindowBase::wxWindowBase() #if wxUSE_VALIDATORS // no validator - m_windowValidator = (wxValidator *) NULL; + m_windowValidator = NULL; #endif // wxUSE_VALIDATORS // the colours/fonts are default for now, so leave m_font, @@ -166,24 +166,24 @@ wxWindowBase::wxWindowBase() #if wxUSE_CONSTRAINTS // no constraints whatsoever - m_constraints = (wxLayoutConstraints *) NULL; - m_constraintsInvolvedIn = (wxWindowList *) NULL; + m_constraints = NULL; + m_constraintsInvolvedIn = NULL; #endif // wxUSE_CONSTRAINTS - m_windowSizer = (wxSizer *) NULL; - m_containingSizer = (wxSizer *) NULL; + m_windowSizer = NULL; + m_containingSizer = NULL; m_autoLayout = false; #if wxUSE_DRAG_AND_DROP - m_dropTarget = (wxDropTarget *)NULL; + m_dropTarget = NULL; #endif // wxUSE_DRAG_AND_DROP #if wxUSE_TOOLTIPS - m_tooltip = (wxToolTip *)NULL; + m_tooltip = NULL; #endif // wxUSE_TOOLTIPS #if wxUSE_CARET - m_caret = (wxCaret *)NULL; + m_caret = NULL; #endif // wxUSE_CARET #if wxUSE_PALETTE @@ -196,7 +196,7 @@ wxWindowBase::wxWindowBase() m_virtualSize = wxDefaultSize; - m_scrollHelper = (wxScrollHelper *) NULL; + m_scrollHelper = NULL; m_windowVariant = wxWINDOW_VARIANT_NORMAL; #if wxUSE_SYSTEM_OPTIONS @@ -1100,16 +1100,16 @@ wxEvtHandler *wxWindowBase::PopEventHandler(bool deleteHandler) if ( handlerA ) { wxEvtHandler *handlerB = handlerA->GetNextHandler(); - handlerA->SetNextHandler((wxEvtHandler *)NULL); + handlerA->SetNextHandler(NULL); if ( handlerB ) - handlerB->SetPreviousHandler((wxEvtHandler *)NULL); + handlerB->SetPreviousHandler(NULL); SetEventHandler(handlerB); if ( deleteHandler ) { delete handlerA; - handlerA = (wxEvtHandler *)NULL; + handlerA = NULL; } } @@ -1441,7 +1441,7 @@ wxWindow *wxWindowBase::FindWindow(long id) const if ( id == m_windowId ) return (wxWindow *)this; - wxWindowBase *res = (wxWindow *)NULL; + wxWindowBase *res = NULL; wxWindowList::compatibility_iterator node; for ( node = m_children.GetFirst(); node && !res; node = node->GetNext() ) { @@ -1457,7 +1457,7 @@ wxWindow *wxWindowBase::FindWindow(const wxString& name) const if ( name == m_windowName ) return (wxWindow *)this; - wxWindowBase *res = (wxWindow *)NULL; + wxWindowBase *res = NULL; wxWindowList::compatibility_iterator node; for ( node = m_children.GetFirst(); node && !res; node = node->GetNext() ) { @@ -1810,7 +1810,7 @@ void wxWindowBase::SetToolTip( const wxString &tip ) } // setting empty tooltip text does not remove the tooltip any more - use - // SetToolTip((wxToolTip *)NULL) for this + // SetToolTip(NULL) for this } void wxWindowBase::DoSetToolTip(wxToolTip *tooltip) @@ -1934,7 +1934,7 @@ void wxWindowBase::DeleteRelatedConstraints() } delete m_constraintsInvolvedIn; - m_constraintsInvolvedIn = (wxWindowList *) NULL; + m_constraintsInvolvedIn = NULL; } } diff --git a/src/common/wxcrt.cpp b/src/common/wxcrt.cpp index 99982f5e06..bd30db8770 100644 --- a/src/common/wxcrt.cpp +++ b/src/common/wxcrt.cpp @@ -99,9 +99,9 @@ WXDLLIMPEXP_BASE size_t wxMB2WC(wchar_t *buf, const char *psz, size_t n) // support it (the only currently known example being Metrowerks, see // wx/crt.h) we don't use its mbstowcs() at all #ifdef HAVE_WCSRTOMBS - return mbsrtowcs((wchar_t *) NULL, &psz, 0, &mbstate); + return mbsrtowcs(NULL, &psz, 0, &mbstate); #else - return wxMbstowcs((wchar_t *) NULL, psz, 0); + return wxMbstowcs(NULL, psz, 0); #endif } @@ -126,9 +126,9 @@ WXDLLIMPEXP_BASE size_t wxWC2MB(char *buf, const wchar_t *pwz, size_t n) } #ifdef HAVE_WCSRTOMBS - return wcsrtombs((char *) NULL, &pwz, 0, &mbstate); + return wcsrtombs(NULL, &pwz, 0, &mbstate); #else - return wxWcstombs((char *) NULL, pwz, 0); + return wxWcstombs(NULL, pwz, 0); #endif } #endif // wxUSE_WCHAR_T @@ -911,7 +911,7 @@ WXDLLIMPEXP_BASE wchar_t* wxCRT_GetenvW(const wchar_t *name) // NB: buffer returned by getenv() is allowed to be overwritten next // time getenv() is called, so it is OK to use static string // buffer to hold the data. - static wxWCharBuffer value((wchar_t*)NULL); + static wxWCharBuffer value; value = wxConvLibc.cMB2WC(getenv(wxConvLibc.cWC2MB(name))); return value.data(); } @@ -1115,15 +1115,15 @@ static T *wxCRT_DoStrtok(T *psz, const T *delim, T **save_ptr) psz += wxStrspn(psz, delim); if (!*psz) { - *save_ptr = (T *)NULL; - return (T *)NULL; + *save_ptr = NULL; + return NULL; } T *ret = psz; psz = wxStrpbrk(psz, delim); if (!psz) { - *save_ptr = (T*)NULL; + *save_ptr = NULL; } else { diff --git a/src/generic/calctrlg.cpp b/src/generic/calctrlg.cpp index 40b9f06cd3..98b15213c5 100644 --- a/src/generic/calctrlg.cpp +++ b/src/generic/calctrlg.cpp @@ -1060,7 +1060,7 @@ void wxGenericCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) unsigned int day = date.GetDay(); wxString dayStr = wxString::Format(_T("%u"), day); wxCoord width; - dc.GetTextExtent(dayStr, &width, (wxCoord *)NULL); + dc.GetTextExtent(dayStr, &width, NULL); bool changedColours = false, changedFont = false; diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index 5b04755247..7148eef2d1 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -313,7 +313,7 @@ wxPostScriptDCImpl::wxPostScriptDCImpl( wxPrinterDC *owner, const wxPrintData& d void wxPostScriptDCImpl::Init() { - m_pstream = (FILE*) NULL; + m_pstream = NULL; m_currentRed = 0; m_currentGreen = 0; @@ -333,7 +333,7 @@ wxPostScriptDCImpl::~wxPostScriptDCImpl () if (m_pstream) { fclose( m_pstream ); - m_pstream = (FILE*) NULL; + m_pstream = NULL; } } @@ -1798,7 +1798,7 @@ void wxPostScriptDCImpl::EndDoc () if ( m_pstream ) { fclose( m_pstream ); - m_pstream = (FILE *) NULL; + m_pstream = NULL; } #if 0 diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 8ad7f390a0..b50262b473 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -1408,7 +1408,7 @@ static const char * file_icons_tbl_computer_xpm[] = { // ---------------------------------------------------------------------------- // global instance of a wxFileIconsTable -wxFileIconsTable* wxTheFileIconsTable = (wxFileIconsTable *)NULL; +wxFileIconsTable* wxTheFileIconsTable = NULL; // A module to allow icons table cleanup diff --git a/src/generic/dragimgg.cpp b/src/generic/dragimgg.cpp index 2da9893cb2..31dcc04f7a 100644 --- a/src/generic/dragimgg.cpp +++ b/src/generic/dragimgg.cpp @@ -69,13 +69,13 @@ void wxGenericDragImage::Init() { m_isDirty = false; m_isShown = false; - m_windowDC = (wxDC*) NULL; - m_window = (wxWindow*) NULL; + m_windowDC = NULL; + m_window = NULL; m_fullScreen = false; #ifdef wxHAS_NATIVE_OVERLAY m_dcOverlay = NULL; #else - m_pBackingBitmap = (wxBitmap*) NULL; + m_pBackingBitmap = NULL; #endif } @@ -359,7 +359,7 @@ bool wxGenericDragImage::EndDrag() m_windowDC->DestroyClippingRegion(); #endif delete m_windowDC; - m_windowDC = (wxDC*) NULL; + m_windowDC = NULL; } #ifndef wxHAS_NATIVE_OVERLAY @@ -373,7 +373,7 @@ bool wxGenericDragImage::EndDrag() // is non-NULL, or in screen coordinates if NULL. bool wxGenericDragImage::Move(const wxPoint& pt) { - wxASSERT_MSG( (m_windowDC != (wxDC*) NULL), wxT("No window DC in wxGenericDragImage::Move()") ); + wxASSERT_MSG( (m_windowDC != NULL), wxT("No window DC in wxGenericDragImage::Move()") ); wxPoint pt2(pt); if (m_fullScreen) @@ -397,7 +397,7 @@ bool wxGenericDragImage::Move(const wxPoint& pt) bool wxGenericDragImage::Show() { - wxASSERT_MSG( (m_windowDC != (wxDC*) NULL), wxT("No window DC in wxGenericDragImage::Show()") ); + wxASSERT_MSG( (m_windowDC != NULL), wxT("No window DC in wxGenericDragImage::Show()") ); // Show at the current position @@ -435,7 +435,7 @@ bool wxGenericDragImage::UpdateBackingFromWindow(wxDC& windowDC, wxMemoryDC& des bool wxGenericDragImage::Hide() { - wxASSERT_MSG( (m_windowDC != (wxDC*) NULL), wxT("No window DC in wxGenericDragImage::Hide()") ); + wxASSERT_MSG( (m_windowDC != NULL), wxT("No window DC in wxGenericDragImage::Hide()") ); // Repair the old position diff --git a/src/generic/helpext.cpp b/src/generic/helpext.cpp index 8faf2560f3..7b0cbc2c17 100644 --- a/src/generic/helpext.cpp +++ b/src/generic/helpext.cpp @@ -155,7 +155,7 @@ void wxExtHelpController::DeleteList() } delete m_MapList; - m_MapList = (wxList*) NULL; + m_MapList = NULL; } } diff --git a/src/generic/imaglist.cpp b/src/generic/imaglist.cpp index b285c15935..61fb228a2e 100644 --- a/src/generic/imaglist.cpp +++ b/src/generic/imaglist.cpp @@ -122,7 +122,7 @@ const wxBitmap *wxGenericImageList::GetBitmapPtr( int index ) const { wxList::compatibility_iterator node = m_images.Item( index ); - wxCHECK_MSG( node, (wxBitmap *) NULL, wxT("wrong index in image list") ); + wxCHECK_MSG( node, NULL, wxT("wrong index in image list") ); return (wxBitmap*)node->GetData(); } diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index f4dc7c1699..5283ba9954 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -1700,7 +1700,7 @@ END_EVENT_TABLE() void wxListHeaderWindow::Init() { - m_currentCursor = (wxCursor *) NULL; + m_currentCursor = NULL; m_isDragging = false; m_dirty = false; } @@ -1709,8 +1709,8 @@ wxListHeaderWindow::wxListHeaderWindow() { Init(); - m_owner = (wxListMainWindow *) NULL; - m_resizeCursor = (wxCursor *) NULL; + m_owner = NULL; + m_resizeCursor = NULL; } wxListHeaderWindow::wxListHeaderWindow( wxWindow *win, @@ -2277,8 +2277,8 @@ void wxListMainWindow::Init() m_headerWidth = m_lineHeight = 0; - m_small_image_list = (wxImageList *) NULL; - m_normal_image_list = (wxImageList *) NULL; + m_small_image_list = NULL; + m_normal_image_list = NULL; m_small_spacing = 30; m_normal_spacing = 40; @@ -2302,7 +2302,7 @@ wxListMainWindow::wxListMainWindow() Init(); m_highlightBrush = - m_highlightUnfocusedBrush = (wxBrush *) NULL; + m_highlightUnfocusedBrush = NULL; } wxListMainWindow::wxListMainWindow( wxWindow *parent, @@ -4958,16 +4958,16 @@ END_EVENT_TABLE() wxGenericListCtrl::wxGenericListCtrl() { - m_imageListNormal = (wxImageList *) NULL; - m_imageListSmall = (wxImageList *) NULL; - m_imageListState = (wxImageList *) NULL; + m_imageListNormal = NULL; + m_imageListSmall = NULL; + m_imageListState = NULL; m_ownsImageListNormal = m_ownsImageListSmall = m_ownsImageListState = false; - m_mainWin = (wxListMainWindow*) NULL; - m_headerWin = (wxListHeaderWindow*) NULL; + m_mainWin = NULL; + m_headerWin = NULL; m_headerHeight = 0; } @@ -5030,13 +5030,13 @@ bool wxGenericListCtrl::Create(wxWindow *parent, { m_imageListNormal = m_imageListSmall = - m_imageListState = (wxImageList *) NULL; + m_imageListState = NULL; m_ownsImageListNormal = m_ownsImageListSmall = m_ownsImageListState = false; - m_mainWin = (wxListMainWindow*) NULL; - m_headerWin = (wxListHeaderWindow*) NULL; + m_mainWin = NULL; + m_headerWin = NULL; m_headerHeight = 0; @@ -5446,7 +5446,7 @@ wxImageList *wxGenericListCtrl::GetImageList(int which) const else if (which == wxIMAGE_LIST_STATE) return m_imageListState; - return (wxImageList *) NULL; + return NULL; } void wxGenericListCtrl::SetImageList( wxImageList *imageList, int which ) diff --git a/src/generic/logg.cpp b/src/generic/logg.cpp index ed2a915892..1b7301174b 100644 --- a/src/generic/logg.cpp +++ b/src/generic/logg.cpp @@ -235,7 +235,7 @@ void wxVLogStatus(wxFrame *pFrame, const wxString& format, va_list argptr) #else wxLog::OnLog(wxLOG_Status, msg, time(NULL)); #endif - gs_pFrame = (wxFrame *) NULL; + gs_pFrame = NULL; } } @@ -793,7 +793,7 @@ bool wxLogWindow::OnFrameClose(wxFrame * WXUNUSED(frame)) void wxLogWindow::OnFrameDelete(wxFrame * WXUNUSED(frame)) { - m_pLogFrame = (wxLogFrame *)NULL; + m_pLogFrame = NULL; } wxLogWindow::~wxLogWindow() diff --git a/src/generic/notebook.cpp b/src/generic/notebook.cpp index ae59e3ff3f..29b5a4137d 100644 --- a/src/generic/notebook.cpp +++ b/src/generic/notebook.cpp @@ -112,7 +112,7 @@ static int GetPageId(wxTabView *tabview, wxNotebookPage *page) // common part of all ctors void wxNotebook::Init() { - m_tabView = (wxNotebookTabView*) NULL; + m_tabView = NULL; m_nSelection = -1; } diff --git a/src/generic/printps.cpp b/src/generic/printps.cpp index 5a13e0120d..d5396c480a 100644 --- a/src/generic/printps.cpp +++ b/src/generic/printps.cpp @@ -72,7 +72,7 @@ wxPostScriptPrinter::~wxPostScriptPrinter() bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt) { sm_abortIt = false; - sm_abortWindow = (wxWindow *) NULL; + sm_abortWindow = NULL; if (!printout) { @@ -232,7 +232,7 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro wxDC* wxPostScriptPrinter::PrintDialog(wxWindow *parent) { - wxDC* dc = (wxDC*) NULL; + wxDC* dc = NULL; wxGenericPrintDialog dialog( parent, &m_printDialogData ); if (dialog.ShowModal() == wxID_OK) diff --git a/src/generic/prntdlgg.cpp b/src/generic/prntdlgg.cpp index c869dd68a1..2265f2ac24 100644 --- a/src/generic/prntdlgg.cpp +++ b/src/generic/prntdlgg.cpp @@ -221,9 +221,9 @@ void wxGenericPrintDialog::Init(wxWindow * WXUNUSED(parent)) choices[0] = _("All"); choices[1] = _("Pages"); - m_fromText = (wxTextCtrl*)NULL; - m_toText = (wxTextCtrl*)NULL; - m_rangeRadioBox = (wxRadioBox *)NULL; + m_fromText = NULL; + m_toText = NULL; + m_rangeRadioBox = NULL; if (m_printDialogData.GetFromPage() != 0) { diff --git a/src/generic/progdlgg.cpp b/src/generic/progdlgg.cpp index 94e1bed6f1..2f77e37bf0 100644 --- a/src/generic/progdlgg.cpp +++ b/src/generic/progdlgg.cpp @@ -578,7 +578,7 @@ void wxProgressDialog::ReenableOtherWindows() if ( HasFlag(wxPD_APP_MODAL) ) { delete m_winDisabler; - m_winDisabler = (wxWindowDisabler *)NULL; + m_winDisabler = NULL; } else { diff --git a/src/generic/scrlwing.cpp b/src/generic/scrlwing.cpp index 49b8673eb4..9691ab4df4 100644 --- a/src/generic/scrlwing.cpp +++ b/src/generic/scrlwing.cpp @@ -937,7 +937,7 @@ void wxScrollHelperBase::StopAutoScrolling() if ( m_timerAutoScroll ) { delete m_timerAutoScroll; - m_timerAutoScroll = (wxTimer *)NULL; + m_timerAutoScroll = NULL; } #endif } diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index f22f3c243e..d0ac066eee 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -116,8 +116,8 @@ void wxSplitterWindow::Init() m_splitMode = wxSPLIT_VERTICAL; m_permitUnsplitAlways = true; - m_windowOne = (wxWindow *) NULL; - m_windowTwo = (wxWindow *) NULL; + m_windowOne = NULL; + m_windowTwo = NULL; m_dragMode = wxSPLIT_DRAG_NONE; m_oldX = 0; m_oldY = 0; @@ -294,7 +294,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) // We remove the first window from the view wxWindow *removedWindow = m_windowOne; m_windowOne = m_windowTwo; - m_windowTwo = (wxWindow *) NULL; + m_windowTwo = NULL; OnUnsplit(removedWindow); wxSplitterEvent eventUnsplit(wxEVT_COMMAND_SPLITTER_UNSPLIT, this); eventUnsplit.m_data.win = removedWindow; @@ -305,7 +305,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) { // We remove the second window from the view wxWindow *removedWindow = m_windowTwo; - m_windowTwo = (wxWindow *) NULL; + m_windowTwo = NULL; OnUnsplit(removedWindow); wxSplitterEvent eventUnsplit(wxEVT_COMMAND_SPLITTER_UNSPLIT, this); eventUnsplit.m_data.win = removedWindow; @@ -731,7 +731,7 @@ void wxSplitterWindow::Initialize(wxWindow *window) window->Show(); m_windowOne = window; - m_windowTwo = (wxWindow *) NULL; + m_windowTwo = NULL; DoSetSashPosition(0); } @@ -801,13 +801,13 @@ bool wxSplitterWindow::Unsplit(wxWindow *toRemove) if ( toRemove == NULL || toRemove == m_windowTwo) { win = m_windowTwo ; - m_windowTwo = (wxWindow *) NULL; + m_windowTwo = NULL; } else if ( toRemove == m_windowOne ) { win = m_windowOne ; m_windowOne = m_windowTwo; - m_windowTwo = (wxWindow *) NULL; + m_windowTwo = NULL; } else { diff --git a/src/generic/tabg.cpp b/src/generic/tabg.cpp index ca40c60100..2ce29fd049 100644 --- a/src/generic/tabg.cpp +++ b/src/generic/tabg.cpp @@ -529,7 +529,7 @@ wxTabView::wxTabView(long style) // SetBackgroundColour(m_backgroundColour); m_tabFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_tabSelectedFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); - m_window = (wxWindow *) NULL; + m_window = NULL; } wxTabView::~wxTabView() @@ -579,7 +579,7 @@ wxTabControl *wxTabView::AddTab(int id, const wxString& label, wxTabControl *exi tabControl->SetRowPosition(tabLayer->GetCount()); tabControl->SetColPosition(layer); - wxTabControl *lastTab = (wxTabControl *) NULL; + wxTabControl *lastTab = NULL; if (lastTabNode) lastTab = (wxTabControl *)lastTabNode->GetData(); @@ -729,7 +729,7 @@ void wxTabView::LayoutTabs(void) layerNode = nextLayerNode; } - wxTabControl *lastTab = (wxTabControl *) NULL; + wxTabControl *lastTab = NULL; wxTabLayer *currentLayer = new wxTabLayer; m_layers.Append(currentLayer); @@ -751,7 +751,7 @@ void wxTabView::LayoutTabs(void) { currentLayer = new wxTabLayer; m_layers.Append(currentLayer); - lastTab = (wxTabControl *) NULL; + lastTab = NULL; } } @@ -881,7 +881,7 @@ bool wxTabView::OnEvent(wxMouseEvent& event) wxCoord x, y; event.GetPosition(&x, &y); - wxTabControl *hitControl = (wxTabControl *) NULL; + wxTabControl *hitControl = NULL; wxTabLayerList::compatibility_iterator node = m_layers.GetFirst(); while (node) @@ -1081,7 +1081,7 @@ wxTabControl *wxTabView::FindTabControlForId(int id) const } node1 = node1->GetNext(); } - return (wxTabControl *) NULL; + return NULL; } // Find tab control for layer, position (starting from zero) @@ -1089,11 +1089,11 @@ wxTabControl *wxTabView::FindTabControlForPosition(int layer, int position) cons { wxTabLayerList::compatibility_iterator node1 = m_layers.Item(layer); if (!node1) - return (wxTabControl *) NULL; + return NULL; wxTabLayer *tabLayer = (wxTabLayer *)node1->GetData(); wxList::compatibility_iterator node2 = tabLayer->Item(position); if (!node2) - return (wxTabControl *) NULL; + return NULL; return (wxTabControl *)node2->GetData(); } @@ -1150,7 +1150,7 @@ wxTabbedDialog::wxTabbedDialog(wxWindow *parent, wxWindowID id, long windowStyle, const wxString& name): wxDialog(parent, id, title, pos, size, windowStyle, name) { - m_tabView = (wxTabView *) NULL; + m_tabView = NULL; } wxTabbedDialog::~wxTabbedDialog(void) @@ -1192,7 +1192,7 @@ wxTabbedPanel::wxTabbedPanel(wxWindow *parent, wxWindowID id, const wxPoint& pos const wxSize& size, long windowStyle, const wxString& name): wxPanel(parent, id, pos, size, windowStyle, name) { - m_tabView = (wxTabView *) NULL; + m_tabView = NULL; } wxTabbedPanel::~wxTabbedPanel(void) @@ -1223,7 +1223,7 @@ wxPanelTabView::wxPanelTabView(wxPanel *pan, long style) : wxTabView(style) { m_panel = pan; - m_currentWindow = (wxWindow *) NULL; + m_currentWindow = NULL; if (m_panel->IsKindOf(CLASSINFO(wxTabbedDialog))) ((wxTabbedDialog *)m_panel)->SetTabView(this); diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 1e071880d4..e1e6c3cf84 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -605,7 +605,7 @@ wxGenericTreeItem::wxGenericTreeItem(wxGenericTreeItem *parent, m_parent = parent; - m_attr = (wxTreeItemAttr *)NULL; + m_attr = NULL; m_ownsAttr = false; // We don't know the height here yet. @@ -758,7 +758,7 @@ wxGenericTreeItem *wxGenericTreeItem::HitTest(const wxPoint& point, } // if children are expanded, fall through to evaluate them - if (m_isCollapsed) return (wxGenericTreeItem*) NULL; + if (m_isCollapsed) return NULL; } // evaluate children @@ -773,7 +773,7 @@ wxGenericTreeItem *wxGenericTreeItem::HitTest(const wxPoint& point, return res; } - return (wxGenericTreeItem*) NULL; + return NULL; } int wxGenericTreeItem::GetCurrentImage() const @@ -945,7 +945,7 @@ void wxGenericTreeCtrl::Init() m_current = m_key_current = m_anchor = - m_select_me = (wxGenericTreeItem *) NULL; + m_select_me = NULL; m_hasFocus = false; m_dirty = false; @@ -1685,7 +1685,7 @@ wxTreeItemId wxGenericTreeCtrl::AddRoot(const wxString& text, m_dirty = true; // do this first so stuff below doesn't cause flicker - m_anchor = new wxGenericTreeItem((wxGenericTreeItem *)NULL, text, + m_anchor = new wxGenericTreeItem(NULL, text, image, selImage, data); if ( data != NULL ) { @@ -3595,7 +3595,7 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event ) { m_oldSelection->SetHilight(true); RefreshLine(m_oldSelection); - m_oldSelection = (wxGenericTreeItem *)NULL; + m_oldSelection = NULL; } // generate the drag end event @@ -3606,7 +3606,7 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event ) (void)GetEventHandler()->ProcessEvent(eventEndDrag); m_isDragging = false; - m_dropTarget = (wxGenericTreeItem *)NULL; + m_dropTarget = NULL; SetCursor(m_oldCursor); diff --git a/src/generic/vscroll.cpp b/src/generic/vscroll.cpp index 4ffa9be85e..7192c4e15d 100644 --- a/src/generic/vscroll.cpp +++ b/src/generic/vscroll.cpp @@ -155,7 +155,7 @@ wxVarScrollHelperBase::wxVarScrollHelperBase(wxWindow *win) m_unitFirst = 0; m_win = - m_targetWindow = (wxWindow *)NULL; + m_targetWindow = NULL; m_physicalScrolling = true; m_handler = NULL; diff --git a/src/generic/wizard.cpp b/src/generic/wizard.cpp index e42f6c65e9..664a282443 100644 --- a/src/generic/wizard.cpp +++ b/src/generic/wizard.cpp @@ -289,7 +289,7 @@ wxSize wxWizardSizer::SiblingSize(wxSizerItem *child) void wxWizard::Init() { m_posWizard = wxDefaultPosition; - m_page = (wxWizardPage *)NULL; + m_page = NULL; m_btnPrev = m_btnNext = NULL; m_statbmp = NULL; m_sizerBmpAndPage = NULL; diff --git a/src/gtk/animate.cpp b/src/gtk/animate.cpp index e987f0f568..deeb13de9d 100644 --- a/src/gtk/animate.cpp +++ b/src/gtk/animate.cpp @@ -360,7 +360,7 @@ void wxAnimationCtrl::DisplayStaticImage() if (m_bmpStaticReal.IsOk()) { // show inactive bitmap - GdkBitmap *mask = (GdkBitmap *) NULL; + GdkBitmap *mask = NULL; if (m_bmpStaticReal.GetMask()) mask = m_bmpStaticReal.GetMask()->GetBitmap(); diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index 2847577dde..e982ec4ab0 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -48,7 +48,7 @@ // global data //----------------------------------------------------------------------------- -static GtkWidget *gs_RootWindow = (GtkWidget*) NULL; +static GtkWidget *gs_RootWindow = NULL; //----------------------------------------------------------------------------- // wxYield diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index d79a7ad397..2cc8b7d78e 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -41,26 +41,26 @@ IMPLEMENT_DYNAMIC_CLASS(wxMask,wxObject) wxMask::wxMask() { - m_bitmap = (GdkBitmap *) NULL; + m_bitmap = NULL; } wxMask::wxMask( const wxBitmap& bitmap, const wxColour& colour ) { - m_bitmap = (GdkBitmap *) NULL; + m_bitmap = NULL; Create( bitmap, colour ); } #if wxUSE_PALETTE wxMask::wxMask( const wxBitmap& bitmap, int paletteIndex ) { - m_bitmap = (GdkBitmap *) NULL; + m_bitmap = NULL; Create( bitmap, paletteIndex ); } #endif // wxUSE_PALETTE wxMask::wxMask( const wxBitmap& bitmap ) { - m_bitmap = (GdkBitmap *) NULL; + m_bitmap = NULL; Create( bitmap ); } @@ -76,7 +76,7 @@ bool wxMask::Create( const wxBitmap& bitmap, if (m_bitmap) { g_object_unref (m_bitmap); - m_bitmap = (GdkBitmap*) NULL; + m_bitmap = NULL; } const int w = bitmap.GetWidth(); @@ -155,7 +155,7 @@ bool wxMask::Create( const wxBitmap& bitmap ) if (m_bitmap) { g_object_unref (m_bitmap); - m_bitmap = (GdkBitmap*) NULL; + m_bitmap = NULL; } if (!bitmap.IsOk()) return false; @@ -203,14 +203,14 @@ public: wxBitmapRefData::wxBitmapRefData() { - m_pixmap = (GdkPixmap *) NULL; - m_pixbuf = (GdkPixbuf *) NULL; - m_mask = (wxMask *) NULL; + m_pixmap = NULL; + m_pixbuf = NULL; + m_mask = NULL; m_width = 0; m_height = 0; m_bpp = 0; #if wxUSE_PALETTE - m_palette = (wxPalette *) NULL; + m_palette = NULL; #endif // wxUSE_PALETTE } @@ -574,7 +574,7 @@ int wxBitmap::GetDepth() const wxMask *wxBitmap::GetMask() const { - wxCHECK_MSG( IsOk(), (wxMask *) NULL, wxT("invalid bitmap") ); + wxCHECK_MSG( IsOk(), NULL, wxT("invalid bitmap") ); return M_BMPDATA->m_mask; } @@ -660,7 +660,7 @@ bool wxBitmap::LoadFile( const wxString &name, wxBitmapType type ) if (type == wxBITMAP_TYPE_XPM) { - GdkBitmap *mask = (GdkBitmap*) NULL; + GdkBitmap *mask = NULL; SetPixmap(gdk_pixmap_create_from_xpm(wxGetRootWindow()->window, &mask, NULL, name.fn_str())); if (!M_BMPDATA) return false; // do not set the mask @@ -734,7 +734,7 @@ void wxBitmap::SetPixmap( GdkPixmap *pixmap ) GdkPixmap *wxBitmap::GetPixmap() const { - wxCHECK_MSG( IsOk(), (GdkPixmap *) NULL, wxT("invalid bitmap") ); + wxCHECK_MSG( IsOk(), NULL, wxT("invalid bitmap") ); // create the pixmap on the fly if we use Pixbuf representation: if (M_BMPDATA->m_pixmap == NULL) diff --git a/src/gtk/choice.cpp b/src/gtk/choice.cpp index 8ccb592059..fa6221e50a 100644 --- a/src/gtk/choice.cpp +++ b/src/gtk/choice.cpp @@ -42,7 +42,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControlWithItems) void wxChoice::Init() { - m_strings = (wxSortedArrayString *)NULL; + m_strings = NULL; m_stringCellIndex = 0; } diff --git a/src/gtk/cursor.cpp b/src/gtk/cursor.cpp index 1400774059..2056e4692b 100644 --- a/src/gtk/cursor.cpp +++ b/src/gtk/cursor.cpp @@ -39,7 +39,7 @@ public: wxCursorRefData::wxCursorRefData() { - m_cursor = (GdkCursor *) NULL; + m_cursor = NULL; } wxCursorRefData::~wxCursorRefData() diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp index 297f496801..af854e9045 100644 --- a/src/gtk/dataview.cpp +++ b/src/gtk/dataview.cpp @@ -2621,7 +2621,7 @@ void wxDataViewColumn::SetBitmap( const wxBitmap &bitmap ) { GtkImage *gtk_image = GTK_IMAGE(m_image); - GdkBitmap *mask = (GdkBitmap *) NULL; + GdkBitmap *mask = NULL; if (bitmap.GetMask()) mask = bitmap.GetMask()->GetBitmap(); diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index c7b1ce56c6..8ae3e61149 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -216,7 +216,7 @@ static GdkGC* wxGetPoolGC( GdkWindow *window, wxPoolGCType type ) // The realloc failed. Fall through to error. wxFAIL_MSG( wxT("No GC available") ); - return (GdkGC*) NULL; + return NULL; } static void wxFreePoolGC( GdkGC *gc ) @@ -242,16 +242,16 @@ IMPLEMENT_ABSTRACT_CLASS(wxWindowDCImpl, wxGTKDCImpl) wxWindowDCImpl::wxWindowDCImpl( wxDC *owner ) : wxGTKDCImpl( owner ) { - m_gdkwindow = (GdkWindow*) NULL; - m_penGC = (GdkGC *) NULL; - m_brushGC = (GdkGC *) NULL; - m_textGC = (GdkGC *) NULL; - m_bgGC = (GdkGC *) NULL; - m_cmap = (GdkColormap *) NULL; + m_gdkwindow = NULL; + m_penGC = NULL; + m_brushGC = NULL; + m_textGC = NULL; + m_bgGC = NULL; + m_cmap = NULL; m_isScreenDC = false; - m_context = (PangoContext *)NULL; - m_layout = (PangoLayout *)NULL; - m_fontdesc = (PangoFontDescription *)NULL; + m_context = NULL; + m_layout = NULL; + m_fontdesc = NULL; } wxWindowDCImpl::wxWindowDCImpl( wxDC *owner, wxWindow *window ) : @@ -259,12 +259,12 @@ wxWindowDCImpl::wxWindowDCImpl( wxDC *owner, wxWindow *window ) : { wxASSERT_MSG( window, wxT("DC needs a window") ); - m_gdkwindow = (GdkWindow*) NULL; - m_penGC = (GdkGC *) NULL; - m_brushGC = (GdkGC *) NULL; - m_textGC = (GdkGC *) NULL; - m_bgGC = (GdkGC *) NULL; - m_cmap = (GdkColormap *) NULL; + m_gdkwindow = NULL; + m_penGC = NULL; + m_brushGC = NULL; + m_textGC = NULL; + m_bgGC = NULL; + m_cmap = NULL; m_isScreenDC = false; m_font = window->GetFont(); @@ -411,10 +411,10 @@ void wxWindowDCImpl::SetUpDC( bool isMemDC ) gdk_gc_set_function( m_penGC, GDK_COPY ); /* clipping */ - gdk_gc_set_clip_rectangle( m_penGC, (GdkRectangle *) NULL ); - gdk_gc_set_clip_rectangle( m_brushGC, (GdkRectangle *) NULL ); - gdk_gc_set_clip_rectangle( m_textGC, (GdkRectangle *) NULL ); - gdk_gc_set_clip_rectangle( m_bgGC, (GdkRectangle *) NULL ); + gdk_gc_set_clip_rectangle( m_penGC, NULL ); + gdk_gc_set_clip_rectangle( m_brushGC, NULL ); + gdk_gc_set_clip_rectangle( m_textGC, NULL ); + gdk_gc_set_clip_rectangle( m_bgGC, NULL ); } void wxWindowDCImpl::DoGetSize( int* width, int* height ) const @@ -1905,7 +1905,7 @@ void wxWindowDCImpl::SetPen( const wxPen &pen ) case wxPENSTYLE_SOLID: default: lineStyle = GDK_LINE_SOLID; - req_dash = (wxGTKDash*)NULL; + req_dash = NULL; req_nb_dash = 0; break; } @@ -2224,13 +2224,13 @@ void wxWindowDCImpl::DestroyClippingRegion() void wxWindowDCImpl::Destroy() { if (m_penGC) wxFreePoolGC( m_penGC ); - m_penGC = (GdkGC*) NULL; + m_penGC = NULL; if (m_brushGC) wxFreePoolGC( m_brushGC ); - m_brushGC = (GdkGC*) NULL; + m_brushGC = NULL; if (m_textGC) wxFreePoolGC( m_textGC ); - m_textGC = (GdkGC*) NULL; + m_textGC = NULL; if (m_bgGC) wxFreePoolGC( m_bgGC ); - m_bgGC = (GdkGC*) NULL; + m_bgGC = NULL; } void wxWindowDCImpl::SetDeviceOrigin( wxCoord x, wxCoord y ) diff --git a/src/gtk/dcmemory.cpp b/src/gtk/dcmemory.cpp index 3c22ca1fc1..e1ce88efa2 100644 --- a/src/gtk/dcmemory.cpp +++ b/src/gtk/dcmemory.cpp @@ -76,7 +76,7 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap ) else { m_ok = false; - m_gdkwindow = (GdkWindow *) NULL; + m_gdkwindow = NULL; } } diff --git a/src/gtk/dnd.cpp b/src/gtk/dnd.cpp index 2c54f0805d..60f20c1132 100644 --- a/src/gtk/dnd.cpp +++ b/src/gtk/dnd.cpp @@ -176,7 +176,7 @@ static void target_drag_leave( GtkWidget *WXUNUSED(widget), drop_target->m_firstMotion = true; /* after this, invalidate the drop_target's GdkDragContext */ - drop_target->SetDragContext( (GdkDragContext*) NULL ); + drop_target->SetDragContext( NULL ); } } @@ -278,7 +278,7 @@ static gboolean target_drag_motion( GtkWidget *WXUNUSED(widget), } /* after this, invalidate the drop_target's GdkDragContext */ - drop_target->SetDragContext( (GdkDragContext*) NULL ); + drop_target->SetDragContext( NULL ); /* this has to be done because GDK has no "drag_enter" event */ drop_target->m_firstMotion = false; @@ -376,10 +376,10 @@ static gboolean target_drag_drop( GtkWidget *widget, } /* after this, invalidate the drop_target's GdkDragContext */ - drop_target->SetDragContext( (GdkDragContext*) NULL ); + drop_target->SetDragContext( NULL ); /* after this, invalidate the drop_target's drag widget */ - drop_target->SetDragWidget( (GtkWidget*) NULL ); + drop_target->SetDragWidget( NULL ); /* this has to be done because GDK has no "drag_enter" event */ drop_target->m_firstMotion = true; @@ -444,7 +444,7 @@ static void target_drag_data_received( GtkWidget *WXUNUSED(widget), } /* after this, invalidate the drop_target's drag data */ - drop_target->SetDragData( (GtkSelectionData*) NULL ); + drop_target->SetDragData( NULL ); } } @@ -456,9 +456,9 @@ wxDropTarget::wxDropTarget( wxDataObject *data ) : wxDropTargetBase( data ) { m_firstMotion = true; - m_dragContext = (GdkDragContext*) NULL; - m_dragWidget = (GtkWidget*) NULL; - m_dragData = (GtkSelectionData*) NULL; + m_dragContext = NULL; + m_dragWidget = NULL; + m_dragData = NULL; m_dragTime = 0; } @@ -575,7 +575,7 @@ void wxDropTarget::RegisterWidget( GtkWidget *widget ) gtk_drag_dest_set( widget, (GtkDestDefaults) 0, /* no default behaviour */ - (GtkTargetEntry*) NULL, /* we don't supply any formats here */ + NULL, /* we don't supply any formats here */ 0, /* number of targets = 0 */ (GdkDragAction) 0 ); /* we don't supply any actions here */ @@ -710,7 +710,7 @@ wxDropSource::wxDropSource(wxWindow *win, { m_waiting = true; - m_iconWindow = (GtkWidget*) NULL; + m_iconWindow = NULL; m_window = win; m_widget = win->m_widget; @@ -731,7 +731,7 @@ wxDropSource::wxDropSource(wxDataObject& data, SetData( data ); - m_iconWindow = (GtkWidget*) NULL; + m_iconWindow = NULL; m_window = win; m_widget = win->m_widget; @@ -777,7 +777,7 @@ void wxDropSource::PrepareIcon( int action, GdkDragContext *context ) if ( icon->GetMask() ) mask = icon->GetMask()->GetBitmap(); else - mask = (GdkBitmap *)NULL; + mask = NULL; GdkPixmap *pixmap = icon->GetPixmap(); @@ -829,7 +829,7 @@ wxDragResult wxDropSource::DoDragDrop(int flags) m_waiting = true; - GtkTargetList *target_list = gtk_target_list_new( (GtkTargetEntry*) NULL, 0 ); + GtkTargetList *target_list = gtk_target_list_new( NULL, 0 ); wxDataFormat *array = new wxDataFormat[ m_data->GetFormatCount() ]; m_data->GetAllFormats( array ); diff --git a/src/gtk/font.cpp b/src/gtk/font.cpp index ea4997a099..7f77a346fc 100644 --- a/src/gtk/font.cpp +++ b/src/gtk/font.cpp @@ -464,7 +464,7 @@ bool wxFont::GetNoAntiAliasing() const const wxNativeFontInfo *wxFont::GetNativeFontInfo() const { - wxCHECK_MSG( Ok(), (wxNativeFontInfo *)NULL, wxT("invalid font") ); + wxCHECK_MSG( Ok(), NULL, wxT("invalid font") ); return &(M_FONTDATA->m_nativeFontInfo); } diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index d453bf384a..1feb343732 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -330,7 +330,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControlWithItems) void wxListBox::Init() { - m_treeview = (GtkTreeView*) NULL; + m_treeview = NULL; #if wxUSE_CHECKLISTBOX m_hasCheckBoxes = false; #endif // wxUSE_CHECKLISTBOX @@ -361,7 +361,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, return false; } - m_widget = gtk_scrolled_window_new( (GtkAdjustment*) NULL, (GtkAdjustment*) NULL ); + m_widget = gtk_scrolled_window_new( NULL, NULL ); g_object_ref(m_widget); if (style & wxLB_ALWAYS_SB) { @@ -923,7 +923,7 @@ int wxListBox::DoListHitTest(const wxPoint& point) const void wxListBox::ApplyToolTip( GtkTooltips *tips, const gchar *tip ) { // RN: Is this needed anymore? - gtk_tooltips_set_tip( tips, GTK_WIDGET( m_treeview ), tip, (gchar*) NULL ); + gtk_tooltips_set_tip( tips, GTK_WIDGET( m_treeview ), tip, NULL ); } #endif // wxUSE_TOOLTIPS diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index 299de20d54..e0f10d8e70 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -122,7 +122,7 @@ wxMenuBar::~wxMenuBar() static void wxMenubarUnsetInvokingWindow(wxMenu* menu, wxWindow* win, GtkWindow* tlw = NULL) { - menu->SetInvokingWindow( (wxWindow*) NULL ); + menu->SetInvokingWindow( NULL ); // support for native hot keys if (menu->m_accel) @@ -226,7 +226,7 @@ void wxMenuBar::Attach(wxFrame *frame) void wxMenuBar::UnsetInvokingWindow( wxWindow *win ) { - m_invokingWindow = (wxWindow*) NULL; + m_invokingWindow = NULL; wxMenuList::compatibility_iterator node = m_menus.GetFirst(); while (node) @@ -316,7 +316,7 @@ wxMenu *wxMenuBar::Replace(size_t pos, wxMenu *menu, const wxString& title) wxMenu *menuOld = Remove(pos); if ( menuOld && !Insert(pos, menu, title) ) { - return (wxMenu*) NULL; + return NULL; } // either Insert() succeeded or Remove() failed and menuOld is NULL @@ -327,7 +327,7 @@ wxMenu *wxMenuBar::Remove(size_t pos) { wxMenu *menu = wxMenuBarBase::Remove(pos); if ( !menu ) - return (wxMenu*) NULL; + return NULL; gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu->m_owner), NULL); gtk_container_remove(GTK_CONTAINER(m_menubar), menu->m_owner); @@ -410,7 +410,7 @@ wxMenuItem* wxMenuBar::FindItem( int id, wxMenu **menuForItem ) const if ( menuForItem ) { - *menuForItem = result ? result->GetMenu() : (wxMenu *)NULL; + *menuForItem = result ? result->GetMenu() : NULL; } return result; @@ -718,7 +718,7 @@ void wxMenu::Init() g_object_ref(m_menu); gtk_object_sink(GTK_OBJECT(m_menu)); - m_owner = (GtkWidget*) NULL; + m_owner = NULL; // Tearoffs are entries, just like separators. So if we want this // menu to be a tear-off one, we just append a tearoff entry diff --git a/src/gtk/minifram.cpp b/src/gtk/minifram.cpp index a452992cc8..834489387b 100644 --- a/src/gtk/minifram.cpp +++ b/src/gtk/minifram.cpp @@ -175,8 +175,8 @@ gtk_window_button_press_callback(GtkWidget* widget, GdkEventButton* gdk_event, w GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK), - (GdkWindow *) NULL, - (GdkCursor *) NULL, + NULL, + NULL, (unsigned int) GDK_CURRENT_TIME ); win->m_diffX = x; diff --git a/src/gtk/pen.cpp b/src/gtk/pen.cpp index 06c0d8c1ed..e118019c71 100644 --- a/src/gtk/pen.cpp +++ b/src/gtk/pen.cpp @@ -31,7 +31,7 @@ public: m_style = wxPENSTYLE_SOLID; m_joinStyle = wxJOIN_ROUND; m_capStyle = wxCAP_ROUND; - m_dash = (wxGTKDash*) NULL; + m_dash = NULL; m_countDashes = 0; } diff --git a/src/gtk/radiobox.cpp b/src/gtk/radiobox.cpp index 6379116ff7..13e3c1fc27 100644 --- a/src/gtk/radiobox.cpp +++ b/src/gtk/radiobox.cpp @@ -241,7 +241,7 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, unsigned int num_of_cols = GetColumnCount(); unsigned int num_of_rows = GetRowCount(); - GtkRadioButton *rbtn = (GtkRadioButton*) NULL; + GtkRadioButton *rbtn = NULL; GtkWidget *table = gtk_table_new( num_of_rows, num_of_cols, FALSE ); gtk_table_set_col_spacings( GTK_TABLE(table), 1 ); @@ -250,7 +250,7 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, gtk_container_add( GTK_CONTAINER(m_widget), table ); wxString label; - GSList *radio_button_group = (GSList *) NULL; + GSList *radio_button_group = NULL; for (unsigned int i = 0; i < (unsigned int)n; i++) { if ( i != 0 ) diff --git a/src/gtk/region.cpp b/src/gtk/region.cpp index a4f3617046..e58d23498d 100644 --- a/src/gtk/region.cpp +++ b/src/gtk/region.cpp @@ -328,7 +328,7 @@ wxRegionContain wxRegion::DoContainsRect(const wxRect& r) const GdkRegion *wxRegion::GetRegion() const { if (!m_refData) - return (GdkRegion*) NULL; + return NULL; return M_REGIONDATA->m_region; } diff --git a/src/gtk/scrolbar.cpp b/src/gtk/scrolbar.cpp index 0a76b68267..dc832e0b6c 100644 --- a/src/gtk/scrolbar.cpp +++ b/src/gtk/scrolbar.cpp @@ -141,9 +141,9 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, const bool isVertical = (style & wxSB_VERTICAL) != 0; if (isVertical) - m_widget = gtk_vscrollbar_new( (GtkAdjustment *) NULL ); + m_widget = gtk_vscrollbar_new( NULL ); else - m_widget = gtk_hscrollbar_new( (GtkAdjustment *) NULL ); + m_widget = gtk_hscrollbar_new( NULL ); g_object_ref(m_widget); m_scrollBar[0] = (GtkRange*)m_widget; diff --git a/src/gtk/slider.cpp b/src/gtk/slider.cpp index b2a24b3640..e620468043 100644 --- a/src/gtk/slider.cpp +++ b/src/gtk/slider.cpp @@ -304,9 +304,9 @@ bool wxSlider::Create(wxWindow *parent, } if (style & wxSL_VERTICAL) - m_widget = gtk_vscale_new( (GtkAdjustment *) NULL ); + m_widget = gtk_vscale_new( NULL ); else - m_widget = gtk_hscale_new( (GtkAdjustment *) NULL ); + m_widget = gtk_hscale_new( NULL ); g_object_ref(m_widget); gtk_scale_set_draw_value(GTK_SCALE (m_widget), (style & wxSL_LABELS) != 0); diff --git a/src/gtk/tbargtk.cpp b/src/gtk/tbargtk.cpp index fcc213eff4..50ec774b72 100644 --- a/src/gtk/tbargtk.cpp +++ b/src/gtk/tbargtk.cpp @@ -345,7 +345,7 @@ wxToolBar::CreateTool(wxControl *control, const wxString& label) void wxToolBar::Init() { - m_toolbar = (GtkToolbar *)NULL; + m_toolbar = NULL; m_tooltips = NULL; } @@ -648,7 +648,7 @@ wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord WXUNUSED(x), // VZ: GTK+ doesn't seem to have such thing wxFAIL_MSG( _T("wxToolBar::FindToolForPosition() not implemented") ); - return (wxToolBarToolBase *)NULL; + return NULL; } void wxToolBar::SetToolShortHelp( int id, const wxString& helpString ) diff --git a/src/gtk/tooltip.cpp b/src/gtk/tooltip.cpp index 08f55c48f4..8053dca29b 100644 --- a/src/gtk/tooltip.cpp +++ b/src/gtk/tooltip.cpp @@ -24,7 +24,7 @@ // global data //----------------------------------------------------------------------------- -static GtkTooltips *gs_tooltips = (GtkTooltips*) NULL; +static GtkTooltips *gs_tooltips = NULL; //----------------------------------------------------------------------------- // wxToolTip @@ -35,7 +35,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxToolTip, wxObject) wxToolTip::wxToolTip( const wxString &tip ) { m_text = tip; - m_window = (wxWindow*) NULL; + m_window = NULL; } void wxToolTip::SetTip( const wxString &tip ) diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index cf37ab6b71..caffefc1bc 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -59,8 +59,8 @@ int wxOpenModalDialogsCount = 0; // the frame that is currently active (i.e. its child has focus). It is // used to generate wxActivateEvents -static wxTopLevelWindowGTK *g_activeFrame = (wxTopLevelWindowGTK*) NULL; -static wxTopLevelWindowGTK *g_lastActiveFrame = (wxTopLevelWindowGTK*) NULL; +static wxTopLevelWindowGTK *g_activeFrame = NULL; +static wxTopLevelWindowGTK *g_lastActiveFrame = NULL; // if we detect that the app has got/lost the focus, we set this variable to // either TRUE or FALSE and an activate event will be sent during the next @@ -434,7 +434,7 @@ static gboolean property_notify_event( void wxTopLevelWindowGTK::Init() { - m_mainWidget = (GtkWidget*) NULL; + m_mainWidget = NULL; m_isIconized = false; m_fsIsShowing = false; m_themeEnabled = true; diff --git a/src/gtk/utilsgtk.cpp b/src/gtk/utilsgtk.cpp index 19f3ffbe09..76a2c7fa8c 100644 --- a/src/gtk/utilsgtk.cpp +++ b/src/gtk/utilsgtk.cpp @@ -119,7 +119,7 @@ void wxDisplaySizeMM( int *width, int *height ) void wxGetMousePosition( int* x, int* y ) { - gdk_window_get_pointer( (GdkWindow*) NULL, x, y, (GdkModifierType*) NULL ); + gdk_window_get_pointer( NULL, x, y, NULL ); } bool wxColourDisplay() diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 1df7e83264..9b0141293d 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -205,7 +205,7 @@ extern wxCursor g_globalCursor; // mouse capture state: the window which has it and if the mouse is currently // inside it -static wxWindowGTK *g_captureWindow = (wxWindowGTK*) NULL; +static wxWindowGTK *g_captureWindow = NULL; static bool g_captureWindowHasMouse = false; // The window that currently has focus: @@ -220,7 +220,7 @@ static wxWindowGTK *gs_deferredFocusOut = NULL; // global variables because GTK+ DnD want to have the // mouse event that caused it -GdkEvent *g_lastMouseEvent = (GdkEvent*) NULL; +GdkEvent *g_lastMouseEvent = NULL; int g_lastButtonNumber = 0; //----------------------------------------------------------------------------- @@ -1182,7 +1182,7 @@ wxWindowGTK *FindWindowForMouseEvent(wxWindowGTK *win, wxCoord& x, wxCoord& y) } else { - if ((child->m_wxwindow == (GtkWidget*) NULL) && + if ((child->m_wxwindow == NULL) && (child->m_x <= xx) && (child->m_y <= yy) && (child->m_x+child->m_width >= xx) && @@ -2029,9 +2029,9 @@ wxMouseState wxGetMouseState() void wxWindowGTK::Init() { // GTK specific - m_widget = (GtkWidget *) NULL; - m_wxwindow = (GtkWidget *) NULL; - m_focusWidget = (GtkWidget *) NULL; + m_widget = NULL; + m_wxwindow = NULL; + m_focusWidget = NULL; // position/size m_x = 0; @@ -2119,7 +2119,7 @@ bool wxWindowGTK::Create( wxWindow *parent, m_widget = m_wxwindow; else { - m_widget = gtk_scrolled_window_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL ); + m_widget = gtk_scrolled_window_new( NULL, NULL ); GtkScrolledWindow *scrolledWindow = GTK_SCROLLED_WINDOW(m_widget); @@ -2718,7 +2718,7 @@ void wxWindowGTK::DoGetPosition( int *x, int *y ) const if (m_x == -1 && m_y == -1) { - GdkWindow *source = (GdkWindow *) NULL; + GdkWindow *source = NULL; if (m_wxwindow) source = m_wxwindow->window; else @@ -2748,7 +2748,7 @@ void wxWindowGTK::DoClientToScreen( int *x, int *y ) const if (!m_widget->window) return; - GdkWindow *source = (GdkWindow *) NULL; + GdkWindow *source = NULL; if (m_wxwindow) source = m_wxwindow->window; else @@ -2785,7 +2785,7 @@ void wxWindowGTK::DoScreenToClient( int *x, int *y ) const if (!m_widget->window) return; - GdkWindow *source = (GdkWindow *) NULL; + GdkWindow *source = NULL; if (m_wxwindow) source = m_wxwindow->window; else @@ -3470,7 +3470,7 @@ void wxWindowGTK::WarpPointer( int x, int y ) // We provide this function ourselves as it is // missing in GDK (top of this file). - GdkWindow *window = (GdkWindow*) NULL; + GdkWindow *window = NULL; if (m_wxwindow) window = m_wxwindow->window; else @@ -3998,8 +3998,8 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y ) menu->m_popupShown = true; gtk_menu_popup( GTK_MENU(menu->m_menu), - (GtkWidget *) NULL, // parent menu shell - (GtkWidget *) NULL, // parent menu item + NULL, // parent menu shell + NULL, // parent menu item posfunc, // function to position it userdata, // client data 0, // button used to activate it @@ -4074,7 +4074,7 @@ void wxWindowGTK::DoCaptureMouse() { wxCHECK_RET( m_widget != NULL, wxT("invalid window") ); - GdkWindow *window = (GdkWindow*) NULL; + GdkWindow *window = NULL; if (m_wxwindow) window = m_wxwindow->window; else @@ -4092,7 +4092,7 @@ void wxWindowGTK::DoCaptureMouse() GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_POINTER_MOTION_MASK), - (GdkWindow *) NULL, + NULL, cursor->GetCursor(), (guint32)GDK_CURRENT_TIME ); g_captureWindow = this; @@ -4105,9 +4105,9 @@ void wxWindowGTK::DoReleaseMouse() wxCHECK_RET( g_captureWindow, wxT("can't release mouse - not captured") ); - g_captureWindow = (wxWindowGTK*) NULL; + g_captureWindow = NULL; - GdkWindow *window = (GdkWindow*) NULL; + GdkWindow *window = NULL; if (m_wxwindow) window = m_wxwindow->window; else diff --git a/src/gtk1/app.cpp b/src/gtk1/app.cpp index 9810be0320..449a0f2a0b 100644 --- a/src/gtk1/app.cpp +++ b/src/gtk1/app.cpp @@ -85,7 +85,7 @@ bool g_mainThreadLocked = false; gint g_pendingTag = 0; -static GtkWidget *gs_RootWindow = (GtkWidget*) NULL; +static GtkWidget *gs_RootWindow = NULL; //----------------------------------------------------------------------------- // idle system @@ -453,8 +453,8 @@ wxApp::wxApp() m_colorCube = (unsigned char*) NULL; // this is NULL for a "regular" wxApp, but is set (and freed) by a wxGLApp - m_glVisualInfo = (void *) NULL; - m_glFBCInfo = (void *) NULL; + m_glVisualInfo = NULL; + m_glFBCInfo = NULL; } wxApp::~wxApp() diff --git a/src/gtk1/bitmap.cpp b/src/gtk1/bitmap.cpp index cbd92cd42d..3c651e38db 100644 --- a/src/gtk1/bitmap.cpp +++ b/src/gtk1/bitmap.cpp @@ -54,26 +54,26 @@ IMPLEMENT_DYNAMIC_CLASS(wxMask,wxObject) wxMask::wxMask() { - m_bitmap = (GdkBitmap *) NULL; + m_bitmap = NULL; } wxMask::wxMask( const wxBitmap& bitmap, const wxColour& colour ) { - m_bitmap = (GdkBitmap *) NULL; + m_bitmap = NULL; Create( bitmap, colour ); } #if wxUSE_PALETTE wxMask::wxMask( const wxBitmap& bitmap, int paletteIndex ) { - m_bitmap = (GdkBitmap *) NULL; + m_bitmap = NULL; Create( bitmap, paletteIndex ); } #endif // wxUSE_PALETTE wxMask::wxMask( const wxBitmap& bitmap ) { - m_bitmap = (GdkBitmap *) NULL; + m_bitmap = NULL; Create( bitmap ); } @@ -89,7 +89,7 @@ bool wxMask::Create( const wxBitmap& bitmap, if (m_bitmap) { gdk_bitmap_unref( m_bitmap ); - m_bitmap = (GdkBitmap*) NULL; + m_bitmap = NULL; } wxImage image = bitmap.ConvertToImage(); @@ -195,7 +195,7 @@ bool wxMask::Create( const wxBitmap& bitmap ) if (m_bitmap) { gdk_bitmap_unref( m_bitmap ); - m_bitmap = (GdkBitmap*) NULL; + m_bitmap = NULL; } if (!bitmap.Ok()) return false; @@ -247,14 +247,14 @@ public: wxBitmapRefData::wxBitmapRefData() { - m_pixmap = (GdkPixmap *) NULL; - m_bitmap = (GdkBitmap *) NULL; - m_mask = (wxMask *) NULL; + m_pixmap = NULL; + m_bitmap = NULL; + m_mask = NULL; m_width = 0; m_height = 0; m_bpp = 0; #if wxUSE_PALETTE - m_palette = (wxPalette *) NULL; + m_palette = NULL; #endif // wxUSE_PALETTE } @@ -393,7 +393,7 @@ wxBitmap::wxBitmap(const char* const* bits) m_refData = new wxBitmapRefData(); - GdkBitmap *mask = (GdkBitmap*) NULL; + GdkBitmap *mask = NULL; M_BMPDATA->m_pixmap = gdk_pixmap_create_from_xpm_d( wxGetRootWindow()->window, &mask, NULL, (gchar **) bits ); @@ -424,7 +424,7 @@ wxBitmap wxBitmap::Rescale( int clipx, int clipy, int clipwidth, int clipheight, wxBitmap bmp; - GdkImage *img = (GdkImage*) NULL; + GdkImage *img = NULL; if (GetPixmap()) img = gdk_image_get( GetPixmap(), 0, 0, GetWidth(), GetHeight() ); else if (GetBitmap()) @@ -643,7 +643,7 @@ bool wxBitmap::CreateFromImageAsBitmap(const wxImage& img) // Create mask image - GdkImage *mask_image = (GdkImage*) NULL; + GdkImage *mask_image = NULL; if (image.HasMask()) { @@ -779,7 +779,7 @@ bool wxBitmap::CreateFromImageAsPixmap(const wxImage& img) // Create mask image - GdkImage *mask_image = (GdkImage*) NULL; + GdkImage *mask_image = NULL; if (image.HasMask()) { @@ -977,7 +977,7 @@ wxImage wxBitmap::ConvertToImage() const static const int MASK_BLUE = 3; static const int MASK_BLUE_REPLACEMENT = 2; - GdkImage *gdk_image = (GdkImage*) NULL; + GdkImage *gdk_image = NULL; if (HasPixmap()) { @@ -998,7 +998,7 @@ wxImage wxBitmap::ConvertToImage() const wxCHECK_MSG( gdk_image, wxNullImage, wxT("couldn't create image") ); - GdkImage *gdk_image_mask = (GdkImage*) NULL; + GdkImage *gdk_image_mask = NULL; if (GetMask()) { gdk_image_mask = gdk_image_get( GetMask()->GetBitmap(), @@ -1119,7 +1119,7 @@ wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth { m_refData = new wxBitmapRefData(); - M_BMPDATA->m_mask = (wxMask *) NULL; + M_BMPDATA->m_mask = NULL; M_BMPDATA->m_bitmap = gdk_bitmap_create_from_data ( wxGetRootWindow()->window, @@ -1162,7 +1162,7 @@ int wxBitmap::GetDepth() const wxMask *wxBitmap::GetMask() const { - wxCHECK_MSG( Ok(), (wxMask *) NULL, wxT("invalid bitmap") ); + wxCHECK_MSG( Ok(), NULL, wxT("invalid bitmap") ); return M_BMPDATA->m_mask; } @@ -1257,7 +1257,7 @@ bool wxBitmap::LoadFile( const wxString &name, wxBitmapType type ) { m_refData = new wxBitmapRefData(); - GdkBitmap *mask = (GdkBitmap*) NULL; + GdkBitmap *mask = NULL; M_BMPDATA->m_pixmap = gdk_pixmap_create_from_xpm ( @@ -1293,7 +1293,7 @@ bool wxBitmap::LoadFile( const wxString &name, wxBitmapType type ) wxPalette *wxBitmap::GetPalette() const { if (!Ok()) - return (wxPalette *) NULL; + return NULL; return M_BMPDATA->m_palette; } @@ -1340,7 +1340,7 @@ void wxBitmap::SetBitmap( GdkPixmap *bitmap ) GdkPixmap *wxBitmap::GetPixmap() const { - wxCHECK_MSG( Ok(), (GdkPixmap *) NULL, wxT("invalid bitmap") ); + wxCHECK_MSG( Ok(), NULL, wxT("invalid bitmap") ); return M_BMPDATA->m_pixmap; } @@ -1354,7 +1354,7 @@ bool wxBitmap::HasPixmap() const GdkBitmap *wxBitmap::GetBitmap() const { - wxCHECK_MSG( Ok(), (GdkBitmap *) NULL, wxT("invalid bitmap") ); + wxCHECK_MSG( Ok(), NULL, wxT("invalid bitmap") ); return M_BMPDATA->m_bitmap; } diff --git a/src/gtk1/bmpbuttn.cpp b/src/gtk1/bmpbuttn.cpp index a814ea7a31..d65eaae68a 100644 --- a/src/gtk1/bmpbuttn.cpp +++ b/src/gtk1/bmpbuttn.cpp @@ -206,7 +206,7 @@ void wxBitmapButton::OnSetBitmap() if (!the_one.Ok()) the_one = m_bmpNormal; if (!the_one.Ok()) return; - GdkBitmap *mask = (GdkBitmap *) NULL; + GdkBitmap *mask = NULL; if (the_one.GetMask()) mask = the_one.GetMask()->GetBitmap(); GtkWidget *child = BUTTON_CHILD(m_widget); diff --git a/src/gtk1/choice.cpp b/src/gtk1/choice.cpp index e6d11cc52d..fad9868841 100644 --- a/src/gtk1/choice.cpp +++ b/src/gtk1/choice.cpp @@ -90,7 +90,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControlWithItems) wxChoice::wxChoice() { - m_strings = (wxSortedArrayString *)NULL; + m_strings = NULL; } bool wxChoice::Create( wxWindow *parent, wxWindowID id, @@ -282,7 +282,7 @@ int wxChoice::FindString( const wxString &string, bool bCase ) const while (child) { GtkBin *bin = GTK_BIN( child->data ); - GtkLabel *label = (GtkLabel *) NULL; + GtkLabel *label = NULL; if (bin->child) label = GTK_LABEL(bin->child); if (!label) @@ -322,7 +322,7 @@ void wxChoice::SetString(unsigned int n, const wxString& str ) GtkBin *bin = GTK_BIN( child->data ); if (count == n) { - GtkLabel *label = (GtkLabel *) NULL; + GtkLabel *label = NULL; if (bin->child) label = GTK_LABEL(bin->child); if (!label) @@ -351,7 +351,7 @@ wxString wxChoice::GetString(unsigned int n) const GtkBin *bin = GTK_BIN( child->data ); if (count == n) { - GtkLabel *label = (GtkLabel *) NULL; + GtkLabel *label = NULL; if (bin->child) label = GTK_LABEL(bin->child); if (!label) @@ -424,7 +424,7 @@ void wxChoice::DoApplyWidgetStyle(GtkRcStyle *style) gtk_widget_modify_style( GTK_WIDGET( child->data ), style ); GtkBin *bin = GTK_BIN( child->data ); - GtkWidget *label = (GtkWidget *) NULL; + GtkWidget *label = NULL; if (bin->child) label = bin->child; if (!label) @@ -453,11 +453,11 @@ int wxChoice::GtkAddHelper(GtkWidget *menu, unsigned int pos, const wxString& it if ( index ) { m_clientList.Insert( m_clientList.Item(index - 1), - (wxObject*) NULL ); + NULL ); } else { - m_clientList.Insert( (wxObject*) NULL ); + m_clientList.Insert( NULL ); } } else @@ -469,13 +469,13 @@ int wxChoice::GtkAddHelper(GtkWidget *menu, unsigned int pos, const wxString& it if (pos == m_clientList.GetCount()) { gtk_menu_append( GTK_MENU(menu), menu_item ); - m_clientList.Append( (wxObject*) NULL ); + m_clientList.Append( NULL ); index = m_clientList.GetCount() - 1; } else { gtk_menu_insert( GTK_MENU(menu), menu_item, pos ); - m_clientList.Insert( pos, (wxObject*) NULL ); + m_clientList.Insert( pos, NULL ); index = pos; } } diff --git a/src/gtk1/clipbrd.cpp b/src/gtk1/clipbrd.cpp index 2d1ade92ec..9559118fc5 100644 --- a/src/gtk1/clipbrd.cpp +++ b/src/gtk1/clipbrd.cpp @@ -219,7 +219,7 @@ selection_clear_clip( GtkWidget *WXUNUSED(widget), GdkEventSelection *event ) wxLogTrace(TRACE_CLIPBOARD, wxT("wxClipboard will get cleared" )); delete wxTheClipboard->m_data; - wxTheClipboard->m_data = (wxDataObject*) NULL; + wxTheClipboard->m_data = NULL; } } @@ -313,8 +313,8 @@ wxClipboard::wxClipboard() m_ownsClipboard = false; m_ownsPrimarySelection = false; - m_data = (wxDataObject*) NULL; - m_receivedData = (wxDataObject*) NULL; + m_data = NULL; + m_receivedData = NULL; /* we use m_targetsWidget to query what formats are available */ @@ -371,7 +371,7 @@ void wxClipboard::Clear() { m_waiting = true; - gtk_selection_owner_set( (GtkWidget*) NULL, g_clipboardAtom, + gtk_selection_owner_set( NULL, g_clipboardAtom, (guint32) GDK_CURRENT_TIME ); while (m_waiting) gtk_main_iteration(); @@ -381,7 +381,7 @@ void wxClipboard::Clear() { m_waiting = true; - gtk_selection_owner_set( (GtkWidget*) NULL, GDK_SELECTION_PRIMARY, + gtk_selection_owner_set( NULL, GDK_SELECTION_PRIMARY, (guint32) GDK_CURRENT_TIME ); while (m_waiting) gtk_main_iteration(); @@ -390,7 +390,7 @@ void wxClipboard::Clear() if (m_data) { delete m_data; - m_data = (wxDataObject*) NULL; + m_data = NULL; } #if wxUSE_THREADS diff --git a/src/gtk1/colour.cpp b/src/gtk1/colour.cpp index 60d6b17e66..4d379eb632 100644 --- a/src/gtk1/colour.cpp +++ b/src/gtk1/colour.cpp @@ -35,7 +35,7 @@ public: m_color.green = 0; m_color.blue = 0; m_color.pixel = 0; - m_colormap = (GdkColormap *) NULL; + m_colormap = NULL; m_hasPixel = false; } @@ -178,7 +178,7 @@ void wxColour::InitRGBA(unsigned char red, unsigned char green, unsigned char bl M_COLDATA->m_color.blue = ((unsigned short)blue) << SHIFT; M_COLDATA->m_color.pixel = 0; - M_COLDATA->m_colormap = (GdkColormap*) NULL; + M_COLDATA->m_colormap = NULL; M_COLDATA->m_hasPixel = false; } @@ -219,7 +219,7 @@ int wxColour::GetPixel() const GdkColor *wxColour::GetColor() const { - wxCHECK_MSG( Ok(), (GdkColor *) NULL, wxT("invalid colour") ); + wxCHECK_MSG( Ok(), NULL, wxT("invalid colour") ); return &M_COLDATA->m_color; } diff --git a/src/gtk1/combobox.cpp b/src/gtk1/combobox.cpp index 352310b904..a86bfa6899 100644 --- a/src/gtk1/combobox.cpp +++ b/src/gtk1/combobox.cpp @@ -247,8 +247,8 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value, { GtkWidget *list_item = gtk_list_item_new_with_label( wxGTK_CONV( choices[i] ) ); - m_clientDataList.Append( (wxObject*)NULL ); - m_clientObjectList.Append( (wxObject*)NULL ); + m_clientDataList.Append( NULL ); + m_clientObjectList.Append( NULL ); gtk_container_add( GTK_CONTAINER(list), list_item ); @@ -365,9 +365,9 @@ int wxComboBox::DoInsertItems(const wxArrayStringsAdapter& items, gtk_widget_show( list_item ); if ( m_clientDataList.GetCount() < GetCount() ) - m_clientDataList.Insert( pos, (wxObject*) NULL ); + m_clientDataList.Insert( pos, NULL ); if ( m_clientObjectList.GetCount() < GetCount() ) - m_clientObjectList.Insert( pos, (wxObject*) NULL ); + m_clientObjectList.Insert( pos, NULL ); AssignNewItemClientData(pos, clientData, i, type); } @@ -435,7 +435,7 @@ void wxComboBox::DoDeleteOneItem(unsigned int n) DisableEvents(); - GList *list = g_list_append( (GList*) NULL, child->data ); + GList *list = g_list_append( NULL, child->data ); gtk_list_remove_items( listbox, list ); g_list_free( list ); diff --git a/src/gtk1/cursor.cpp b/src/gtk1/cursor.cpp index d9373ef29d..b402989ce0 100644 --- a/src/gtk1/cursor.cpp +++ b/src/gtk1/cursor.cpp @@ -42,7 +42,7 @@ public: wxCursorRefData::wxCursorRefData() { - m_cursor = (GdkCursor *) NULL; + m_cursor = NULL; } wxCursorRefData::~wxCursorRefData() diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index 9ee0908a4c..73f7c3e9d8 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -241,7 +241,7 @@ static GdkGC* wxGetPoolGC( GdkWindow *window, wxPoolGCType type ) // The realloc failed. Fall through to error. wxFAIL_MSG( wxT("No GC available") ); - return (GdkGC*) NULL; + return NULL; } static void wxFreePoolGC( GdkGC *gc ) @@ -267,14 +267,14 @@ IMPLEMENT_ABSTRACT_CLASS(wxWindowDCImpl, wxDC) wxWindowDCImpl::wxWindowDCImpl(wxDC *owner) : wxGTKDCImpl(owner) { - m_penGC = (GdkGC *) NULL; - m_brushGC = (GdkGC *) NULL; - m_textGC = (GdkGC *) NULL; - m_bgGC = (GdkGC *) NULL; - m_cmap = (GdkColormap *) NULL; + m_penGC = NULL; + m_brushGC = NULL; + m_textGC = NULL; + m_bgGC = NULL; + m_cmap = NULL; m_isMemDC = false; m_isScreenDC = false; - m_owner = (wxWindow *)NULL; + m_owner = NULL; } wxWindowDCImpl::wxWindowDCImpl(wxDC *owner, wxWindow *window) @@ -282,12 +282,12 @@ wxWindowDCImpl::wxWindowDCImpl(wxDC *owner, wxWindow *window) { wxASSERT_MSG( window, wxT("DC needs a window") ); - m_penGC = (GdkGC *) NULL; - m_brushGC = (GdkGC *) NULL; - m_textGC = (GdkGC *) NULL; - m_bgGC = (GdkGC *) NULL; - m_cmap = (GdkColormap *) NULL; - m_owner = (wxWindow *)NULL; + m_penGC = NULL; + m_brushGC = NULL; + m_textGC = NULL; + m_bgGC = NULL; + m_cmap = NULL; + m_owner = NULL; m_isMemDC = false; m_isScreenDC = false; m_font = window->GetFont(); @@ -404,20 +404,20 @@ void wxWindowDCImpl::SetUpDC() gdk_gc_set_function( m_penGC, GDK_COPY ); /* clipping */ - gdk_gc_set_clip_rectangle( m_penGC, (GdkRectangle *) NULL ); - gdk_gc_set_clip_rectangle( m_brushGC, (GdkRectangle *) NULL ); - gdk_gc_set_clip_rectangle( m_textGC, (GdkRectangle *) NULL ); - gdk_gc_set_clip_rectangle( m_bgGC, (GdkRectangle *) NULL ); + gdk_gc_set_clip_rectangle( m_penGC, NULL ); + gdk_gc_set_clip_rectangle( m_brushGC, NULL ); + gdk_gc_set_clip_rectangle( m_textGC, NULL ); + gdk_gc_set_clip_rectangle( m_bgGC, NULL ); if (!hatch_bitmap) { hatch_bitmap = hatches; - hatch_bitmap[0] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, bdiag_bits, bdiag_width, bdiag_height ); - hatch_bitmap[1] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, cdiag_bits, cdiag_width, cdiag_height ); - hatch_bitmap[2] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, fdiag_bits, fdiag_width, fdiag_height ); - hatch_bitmap[3] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, cross_bits, cross_width, cross_height ); - hatch_bitmap[4] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, horiz_bits, horiz_width, horiz_height ); - hatch_bitmap[5] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, verti_bits, verti_width, verti_height ); + hatch_bitmap[0] = gdk_bitmap_create_from_data( NULL, bdiag_bits, bdiag_width, bdiag_height ); + hatch_bitmap[1] = gdk_bitmap_create_from_data( NULL, cdiag_bits, cdiag_width, cdiag_height ); + hatch_bitmap[2] = gdk_bitmap_create_from_data( NULL, fdiag_bits, fdiag_width, fdiag_height ); + hatch_bitmap[3] = gdk_bitmap_create_from_data( NULL, cross_bits, cross_width, cross_height ); + hatch_bitmap[4] = gdk_bitmap_create_from_data( NULL, horiz_bits, horiz_width, horiz_height ); + hatch_bitmap[5] = gdk_bitmap_create_from_data( NULL, verti_bits, verti_width, verti_height ); } } @@ -1044,10 +1044,10 @@ void wxWindowDCImpl::DoDrawBitmap( const wxBitmap &bitmap, use_bitmap.GetPixmap(); // apply mask if any - GdkBitmap *mask = (GdkBitmap *) NULL; + GdkBitmap *mask = NULL; if (use_bitmap.GetMask()) mask = use_bitmap.GetMask()->GetBitmap(); - GdkBitmap *new_mask = (GdkBitmap*) NULL; + GdkBitmap *new_mask = NULL; if (useMask && mask) { @@ -1107,14 +1107,14 @@ void wxWindowDCImpl::DoDrawBitmap( const wxBitmap &bitmap, { if (is_mono) { - gdk_gc_set_clip_mask( m_textGC, (GdkBitmap *) NULL ); + gdk_gc_set_clip_mask( m_textGC, NULL ); gdk_gc_set_clip_origin( m_textGC, 0, 0 ); if (!m_currentClippingRegion.IsNull()) gdk_gc_set_clip_region( m_textGC, m_currentClippingRegion.GetRegion() ); } else { - gdk_gc_set_clip_mask( m_penGC, (GdkBitmap *) NULL ); + gdk_gc_set_clip_mask( m_penGC, NULL ); gdk_gc_set_clip_origin( m_penGC, 0, 0 ); if (!m_currentClippingRegion.IsNull()) gdk_gc_set_clip_region( m_penGC, m_currentClippingRegion.GetRegion() ); @@ -1267,10 +1267,10 @@ bool wxWindowDCImpl::DoBlit( wxCoord xdest, wxCoord ydest, } // apply mask if any - GdkBitmap *mask = (GdkBitmap *) NULL; + GdkBitmap *mask = NULL; if (use_bitmap.GetMask()) mask = use_bitmap.GetMask()->GetBitmap(); - GdkBitmap *new_mask = (GdkBitmap*) NULL; + GdkBitmap *new_mask = NULL; if (useMask && mask) { @@ -1343,14 +1343,14 @@ bool wxWindowDCImpl::DoBlit( wxCoord xdest, wxCoord ydest, { if (is_mono) { - gdk_gc_set_clip_mask( m_textGC, (GdkBitmap *) NULL ); + gdk_gc_set_clip_mask( m_textGC, NULL ); gdk_gc_set_clip_origin( m_textGC, 0, 0 ); if (!m_currentClippingRegion.IsNull()) gdk_gc_set_clip_region( m_textGC, m_currentClippingRegion.GetRegion() ); } else { - gdk_gc_set_clip_mask( m_penGC, (GdkBitmap *) NULL ); + gdk_gc_set_clip_mask( m_penGC, NULL ); gdk_gc_set_clip_origin( m_penGC, 0, 0 ); if (!m_currentClippingRegion.IsNull()) gdk_gc_set_clip_region( m_penGC, m_currentClippingRegion.GetRegion() ); @@ -1733,7 +1733,7 @@ void wxWindowDCImpl::SetPen( const wxPen &pen ) default: { lineStyle = GDK_LINE_SOLID; - req_dash = (wxGTKDash*)NULL; + req_dash = NULL; req_nb_dash = 0; break; } @@ -2070,10 +2070,10 @@ void wxWindowDCImpl::DestroyClippingRegion() if (m_currentClippingRegion.IsEmpty()) { - gdk_gc_set_clip_rectangle( m_penGC, (GdkRectangle *) NULL ); - gdk_gc_set_clip_rectangle( m_brushGC, (GdkRectangle *) NULL ); - gdk_gc_set_clip_rectangle( m_textGC, (GdkRectangle *) NULL ); - gdk_gc_set_clip_rectangle( m_bgGC, (GdkRectangle *) NULL ); + gdk_gc_set_clip_rectangle( m_penGC, NULL ); + gdk_gc_set_clip_rectangle( m_brushGC, NULL ); + gdk_gc_set_clip_rectangle( m_textGC, NULL ); + gdk_gc_set_clip_rectangle( m_bgGC, NULL ); } else { @@ -2087,13 +2087,13 @@ void wxWindowDCImpl::DestroyClippingRegion() void wxWindowDCImpl::Destroy() { if (m_penGC) wxFreePoolGC( m_penGC ); - m_penGC = (GdkGC*) NULL; + m_penGC = NULL; if (m_brushGC) wxFreePoolGC( m_brushGC ); - m_brushGC = (GdkGC*) NULL; + m_brushGC = NULL; if (m_textGC) wxFreePoolGC( m_textGC ); - m_textGC = (GdkGC*) NULL; + m_textGC = NULL; if (m_bgGC) wxFreePoolGC( m_bgGC ); - m_bgGC = (GdkGC*) NULL; + m_bgGC = NULL; } void wxWindowDCImpl::ComputeScaleAndOrigin() diff --git a/src/gtk1/dcmemory.cpp b/src/gtk1/dcmemory.cpp index 3d865283d2..18bc2d0975 100644 --- a/src/gtk1/dcmemory.cpp +++ b/src/gtk1/dcmemory.cpp @@ -61,7 +61,7 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap ) else { m_ok = false; - m_window = (GdkWindow *) NULL; + m_window = NULL; } } diff --git a/src/gtk1/dcscreen.cpp b/src/gtk1/dcscreen.cpp index 0bb3de0009..1cff4e457f 100644 --- a/src/gtk1/dcscreen.cpp +++ b/src/gtk1/dcscreen.cpp @@ -25,7 +25,7 @@ // global data initialization //----------------------------------------------------------------------------- -GdkWindow *wxScreenDCImpl::sm_overlayWindow = (GdkWindow*) NULL; +GdkWindow *wxScreenDCImpl::sm_overlayWindow = NULL; int wxScreenDCImpl::sm_overlayWindowX = 0; int wxScreenDCImpl::sm_overlayWindowY = 0; diff --git a/src/gtk1/dnd.cpp b/src/gtk1/dnd.cpp index 47ce58b017..7b93d12dfa 100644 --- a/src/gtk1/dnd.cpp +++ b/src/gtk1/dnd.cpp @@ -193,7 +193,7 @@ static void target_drag_leave( GtkWidget *WXUNUSED(widget), drop_target->m_firstMotion = true; /* after this, invalidate the drop_target's GdkDragContext */ - drop_target->SetDragContext( (GdkDragContext*) NULL ); + drop_target->SetDragContext( NULL ); } } @@ -286,7 +286,7 @@ static gboolean target_drag_motion( GtkWidget *WXUNUSED(widget), } /* after this, invalidate the drop_target's GdkDragContext */ - drop_target->SetDragContext( (GdkDragContext*) NULL ); + drop_target->SetDragContext( NULL ); /* this has to be done because GDK has no "drag_enter" event */ drop_target->m_firstMotion = false; @@ -384,10 +384,10 @@ static gboolean target_drag_drop( GtkWidget *widget, } /* after this, invalidate the drop_target's GdkDragContext */ - drop_target->SetDragContext( (GdkDragContext*) NULL ); + drop_target->SetDragContext( NULL ); /* after this, invalidate the drop_target's drag widget */ - drop_target->SetDragWidget( (GtkWidget*) NULL ); + drop_target->SetDragWidget( NULL ); /* this has to be done because GDK has no "drag_enter" event */ drop_target->m_firstMotion = true; @@ -448,7 +448,7 @@ static void target_drag_data_received( GtkWidget *WXUNUSED(widget), } /* after this, invalidate the drop_target's drag data */ - drop_target->SetDragData( (GtkSelectionData*) NULL ); + drop_target->SetDragData( NULL ); } } @@ -460,9 +460,9 @@ wxDropTarget::wxDropTarget( wxDataObject *data ) : wxDropTargetBase( data ) { m_firstMotion = true; - m_dragContext = (GdkDragContext*) NULL; - m_dragWidget = (GtkWidget*) NULL; - m_dragData = (GtkSelectionData*) NULL; + m_dragContext = NULL; + m_dragWidget = NULL; + m_dragData = NULL; m_dragTime = 0; } @@ -582,7 +582,7 @@ void wxDropTarget::RegisterWidget( GtkWidget *widget ) gtk_drag_dest_set( widget, (GtkDestDefaults) 0, /* no default behaviour */ - (GtkTargetEntry*) NULL, /* we don't supply any formats here */ + NULL, /* we don't supply any formats here */ 0, /* number of targets = 0 */ (GdkDragAction) 0 ); /* we don't supply any actions here */ @@ -748,7 +748,7 @@ wxDropSource::wxDropSource(wxWindow *win, { m_waiting = true; - m_iconWindow = (GtkWidget*) NULL; + m_iconWindow = NULL; m_window = win; m_widget = win->m_widget; @@ -769,7 +769,7 @@ wxDropSource::wxDropSource(wxDataObject& data, SetData( data ); - m_iconWindow = (GtkWidget*) NULL; + m_iconWindow = NULL; m_window = win; m_widget = win->m_widget; @@ -815,7 +815,7 @@ void wxDropSource::PrepareIcon( int action, GdkDragContext *context ) if ( icon->GetMask() ) mask = icon->GetMask()->GetBitmap(); else - mask = (GdkBitmap *)NULL; + mask = NULL; GdkPixmap *pixmap = icon->GetPixmap(); @@ -871,7 +871,7 @@ wxDragResult wxDropSource::DoDragDrop(int flags) m_waiting = true; - GtkTargetList *target_list = gtk_target_list_new( (GtkTargetEntry*) NULL, 0 ); + GtkTargetList *target_list = gtk_target_list_new( NULL, 0 ); wxDataFormat *array = new wxDataFormat[ m_data->GetFormatCount() ]; m_data->GetAllFormats( array ); diff --git a/src/gtk1/font.cpp b/src/gtk1/font.cpp index 3fa21a96ab..8257f5bf64 100644 --- a/src/gtk1/font.cpp +++ b/src/gtk1/font.cpp @@ -609,7 +609,7 @@ bool wxFont::GetNoAntiAliasing() const const wxNativeFontInfo *wxFont::GetNativeFontInfo() const { - wxCHECK_MSG( Ok(), (wxNativeFontInfo *)NULL, wxT("invalid font") ); + wxCHECK_MSG( Ok(), NULL, wxT("invalid font") ); if ( !M_FONTDATA->HasNativeFont() ) { @@ -710,7 +710,7 @@ void wxFont::SetNoAntiAliasing( bool no ) // get internal representation of font // ---------------------------------------------------------------------------- -static GdkFont *g_systemDefaultGuiFont = (GdkFont*) NULL; +static GdkFont *g_systemDefaultGuiFont = NULL; // this is also used from tbargtk.cpp and tooltip.cpp, hence extern extern GdkFont *GtkGetDefaultGuiFont() @@ -742,7 +742,7 @@ extern GdkFont *GtkGetDefaultGuiFont() GdkFont *wxFont::GetInternalFont( float scale ) const { - GdkFont *font = (GdkFont *) NULL; + GdkFont *font = NULL; wxCHECK_MSG( Ok(), font, wxT("invalid font") ); diff --git a/src/gtk1/frame.cpp b/src/gtk1/frame.cpp index f929afc8e2..2e3f915bee 100644 --- a/src/gtk1/frame.cpp +++ b/src/gtk1/frame.cpp @@ -385,7 +385,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), geom.max_width = maxWidth; geom.max_height = maxHeight; gtk_window_set_geometry_hints( GTK_WINDOW(m_widget), - (GtkWidget*) NULL, + NULL, &geom, (GdkWindowHints) flag ); @@ -486,7 +486,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), gtk_pizza_set_size( GTK_PIZZA(m_wxwindow), m_frameStatusBar->m_widget, xx, yy, ww, hh ); - gtk_widget_draw( m_frameStatusBar->m_widget, (GdkRectangle*) NULL ); + gtk_widget_draw( m_frameStatusBar->m_widget, NULL ); } #endif // wxUSE_STATUSBAR diff --git a/src/gtk1/listbox.cpp b/src/gtk1/listbox.cpp index 9c89f4584c..3c20900647 100644 --- a/src/gtk1/listbox.cpp +++ b/src/gtk1/listbox.cpp @@ -134,7 +134,7 @@ static gint gtk_listitem_focus_out_callback( GtkWidget *WXUNUSED(widget), if (g_isIdle) wxapp_install_idle_handler(); - g_focusWindow = (wxWindowGTK *)NULL; + g_focusWindow = NULL; // don't send the window a kill focus event if it thinks that it doesn't // have focus already @@ -460,7 +460,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControlWithItems) wxListBox::wxListBox() { - m_list = (GtkList *) NULL; + m_list = NULL; #if wxUSE_CHECKLISTBOX m_hasCheckBoxes = false; #endif // wxUSE_CHECKLISTBOX @@ -496,7 +496,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, return false; } - m_widget = gtk_scrolled_window_new( (GtkAdjustment*) NULL, (GtkAdjustment*) NULL ); + m_widget = gtk_scrolled_window_new( NULL, NULL ); if (style & wxLB_ALWAYS_SB) { gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(m_widget), @@ -548,7 +548,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, } else { - m_strings = (wxSortedArrayString *)NULL; + m_strings = NULL; } Append(n, choices); @@ -722,7 +722,7 @@ void wxListBox::DoDeleteOneItem(unsigned int n) wxCHECK_RET( child, wxT("wrong listbox index") ); - GList *list = g_list_append( (GList*) NULL, child->data ); + GList *list = g_list_append( NULL, child->data ); gtk_list_remove_items( m_list, list ); g_list_free( list ); @@ -994,7 +994,7 @@ void wxListBox::ApplyToolTip( GtkTooltips *tips, const wxChar *tip ) GList *child = m_list->children; while (child) { - gtk_tooltips_set_tip( tips, GTK_WIDGET( child->data ), wxConvCurrent->cWX2MB(tip), (gchar*) NULL ); + gtk_tooltips_set_tip( tips, GTK_WIDGET( child->data ), wxConvCurrent->cWX2MB(tip), NULL ); child = child->next; } } diff --git a/src/gtk1/menu.cpp b/src/gtk1/menu.cpp index beeab89cd9..5d65aa257d 100644 --- a/src/gtk1/menu.cpp +++ b/src/gtk1/menu.cpp @@ -181,10 +181,10 @@ void wxMenuBar::Init(size_t n, wxMenu *menus[], const wxString titles[], long st // the parent window is known after wxFrame::SetMenu() m_needParent = false; m_style = style; - m_invokingWindow = (wxWindow*) NULL; + m_invokingWindow = NULL; - if (!PreCreation( (wxWindow*) NULL, wxDefaultPosition, wxDefaultSize ) || - !CreateBase( (wxWindow*) NULL, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, wxT("menubar") )) + if (!PreCreation( NULL, wxDefaultPosition, wxDefaultSize ) || + !CreateBase( NULL, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, wxT("menubar") )) { wxFAIL_MSG( wxT("wxMenuBar creation failed") ); return; @@ -243,7 +243,7 @@ wxMenuBar::~wxMenuBar() static void wxMenubarUnsetInvokingWindow( wxMenu *menu, wxWindow *win ) { - menu->SetInvokingWindow( (wxWindow*) NULL ); + menu->SetInvokingWindow( NULL ); wxWindow *top_frame = win; while (top_frame->GetParent() && !(top_frame->IsTopLevel())) @@ -308,7 +308,7 @@ void wxMenuBar::SetInvokingWindow( wxWindow *win ) void wxMenuBar::UnsetInvokingWindow( wxWindow *win ) { - m_invokingWindow = (wxWindow*) NULL; + m_invokingWindow = NULL; wxWindow *top_frame = win; while (top_frame->GetParent() && !(top_frame->IsTopLevel())) top_frame = top_frame->GetParent(); @@ -410,7 +410,7 @@ wxMenu *wxMenuBar::Replace(size_t pos, wxMenu *menu, const wxString& title) wxMenu *menuOld = Remove(pos); if ( menuOld && !Insert(pos, menu, title) ) { - return (wxMenu*) NULL; + return NULL; } // either Insert() succeeded or Remove() failed and menuOld is NULL @@ -421,7 +421,7 @@ wxMenu *wxMenuBar::Remove(size_t pos) { wxMenu *menu = wxMenuBarBase::Remove(pos); if ( !menu ) - return (wxMenu*) NULL; + return NULL; gtk_menu_item_remove_submenu( GTK_MENU_ITEM(menu->m_owner) ); gtk_container_remove(GTK_CONTAINER(m_menubar), menu->m_owner); @@ -510,7 +510,7 @@ wxMenuItem* wxMenuBar::FindItem( int id, wxMenu **menuForItem ) const if ( menuForItem ) { - *menuForItem = result ? result->GetMenu() : (wxMenu *)NULL; + *menuForItem = result ? result->GetMenu() : NULL; } return result; @@ -740,8 +740,8 @@ wxMenuItem::wxMenuItem(wxMenu *parentMenu, void wxMenuItem::Init() { - m_labelWidget = (GtkWidget *) NULL; - m_menuItem = (GtkWidget *) NULL; + m_labelWidget = NULL; + m_menuItem = NULL; DoSetText(m_text); } @@ -872,7 +872,7 @@ wxAcceleratorEntry *wxMenuItem::GetAccel() const if ( !GetHotKey() ) { // nothing - return (wxAcceleratorEntry *)NULL; + return NULL; } // accelerator parsing code looks for them after a TAB, so insert a dummy @@ -938,7 +938,7 @@ void wxMenu::Init() // our back by GTK+ e.g. when it is removed from menubar: gtk_widget_ref(m_menu); - m_owner = (GtkWidget*) NULL; + m_owner = NULL; // Tearoffs are entries, just like separators. So if we want this // menu to be a tear-off one, we just append a tearoff entry @@ -1151,7 +1151,7 @@ wxMenuItem* wxMenu::DoInsert(size_t pos, wxMenuItem *item) wxMenuItem *wxMenu::DoRemove(wxMenuItem *item) { if ( !wxMenuBase::DoRemove(item) ) - return (wxMenuItem *)NULL; + return NULL; // TODO: this code doesn't delete the item factory item and this seems // impossible as of GTK 1.2.6. @@ -1535,8 +1535,8 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y ) gtk_menu_popup( GTK_MENU(menu->m_menu), - (GtkWidget *) NULL, // parent menu shell - (GtkWidget *) NULL, // parent menu item + NULL, // parent menu shell + NULL, // parent menu item posfunc, // function to position it userdata, // client data 0, // button used to activate it diff --git a/src/gtk1/minifram.cpp b/src/gtk1/minifram.cpp index 4b1572b05c..7f24e602ee 100644 --- a/src/gtk1/minifram.cpp +++ b/src/gtk1/minifram.cpp @@ -192,8 +192,8 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK), - (GdkWindow *) NULL, - (GdkCursor *) NULL, + NULL, + NULL, (unsigned int) GDK_CURRENT_TIME ); win->m_diffX = (int)gdk_event->x; @@ -350,7 +350,7 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title if ((style & wxSYSTEM_MENU) && ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT))) { - GdkBitmap *mask = (GdkBitmap*) NULL; + GdkBitmap *mask = NULL; GdkPixmap *pixmap = gdk_pixmap_create_from_xpm_d ( wxGetRootWindow()->window, @@ -401,7 +401,7 @@ void wxMiniFrame::SetTitle( const wxString &title ) { wxFrame::SetTitle( title ); - gtk_widget_draw( m_mainWidget, (GdkRectangle*) NULL ); + gtk_widget_draw( m_mainWidget, NULL ); } #endif // wxUSE_MINIFRAME diff --git a/src/gtk1/notebook.cpp b/src/gtk1/notebook.cpp index d36a803dac..ac4155516d 100644 --- a/src/gtk1/notebook.cpp +++ b/src/gtk1/notebook.cpp @@ -61,8 +61,8 @@ public: wxGtkNotebookPage() { m_image = -1; - m_page = (GtkNotebookPage *) NULL; - m_box = (GtkWidget *) NULL; + m_page = NULL; + m_box = NULL; } wxString m_text; @@ -291,7 +291,7 @@ void wxNotebook::Init() m_padding = 0; m_inSwitchPage = false; - m_imageList = (wxImageList *) NULL; + m_imageList = NULL; m_selection = -1; m_themeEnabled = true; } @@ -408,9 +408,9 @@ int wxNotebook::GetPageImage( size_t page ) const wxGtkNotebookPage* wxNotebook::GetNotebookPage( int page ) const { - wxCHECK_MSG( m_widget != NULL, (wxGtkNotebookPage*) NULL, wxT("invalid notebook") ); + wxCHECK_MSG( m_widget != NULL, NULL, wxT("invalid notebook") ); - wxCHECK_MSG( page < (int)m_pagesData.GetCount(), (wxGtkNotebookPage*) NULL, wxT("invalid notebook index") ); + wxCHECK_MSG( page < (int)m_pagesData.GetCount(), NULL, wxT("invalid notebook index") ); return m_pagesData.Item(page)->GetData(); } @@ -485,7 +485,7 @@ bool wxNotebook::SetPageImage( size_t page, int image ) if (image == -1 && nb_page->m_image == -1) return true; /* Case 1): Nothing to do. */ - GtkWidget *pixmapwid = (GtkWidget*) NULL; + GtkWidget *pixmapwid = NULL; if (nb_page->m_image != -1) { @@ -521,7 +521,7 @@ bool wxNotebook::SetPageImage( size_t page, int image ) /* Construct the new pixmap */ const wxBitmap *bmp = m_imageList->GetBitmapPtr(image); GdkPixmap *pixmap = bmp->GetPixmap(); - GdkBitmap *mask = (GdkBitmap*) NULL; + GdkBitmap *mask = NULL; if ( bmp->GetMask() ) { mask = bmp->GetMask()->GetBitmap(); @@ -689,7 +689,7 @@ bool wxNotebook::InsertPage( size_t position, const wxBitmap *bmp = m_imageList->GetBitmapPtr(imageId); GdkPixmap *pixmap = bmp->GetPixmap(); - GdkBitmap *mask = (GdkBitmap*) NULL; + GdkBitmap *mask = NULL; if ( bmp->GetMask() ) { mask = bmp->GetMask()->GetBitmap(); diff --git a/src/gtk1/pen.cpp b/src/gtk1/pen.cpp index 2ca4c94bd7..8fa09cd73f 100644 --- a/src/gtk1/pen.cpp +++ b/src/gtk1/pen.cpp @@ -31,7 +31,7 @@ public: m_style = wxPENSTYLE_SOLID; m_joinStyle = wxJOIN_ROUND; m_capStyle = wxCAP_ROUND; - m_dash = (wxGTKDash*) NULL; + m_dash = NULL; m_countDashes = 0; } diff --git a/src/gtk1/popupwin.cpp b/src/gtk1/popupwin.cpp index 26ed0610b5..908baae404 100644 --- a/src/gtk1/popupwin.cpp +++ b/src/gtk1/popupwin.cpp @@ -328,7 +328,7 @@ void wxPopupWindow::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int geom.max_width = m_width; geom.max_height = m_height; gtk_window_set_geometry_hints( GTK_WINDOW(m_widget), - (GtkWidget*) NULL, + NULL, &geom, (GdkWindowHints) flag ); diff --git a/src/gtk1/radiobox.cpp b/src/gtk1/radiobox.cpp index 7aab3d84f8..1a5c86feec 100644 --- a/src/gtk1/radiobox.cpp +++ b/src/gtk1/radiobox.cpp @@ -216,7 +216,7 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, unsigned int num_of_cols = GetColumnCount(); unsigned int num_of_rows = GetRowCount(); - GtkRadioButton *m_radio = (GtkRadioButton*) NULL; + GtkRadioButton *m_radio = NULL; GtkWidget *table = gtk_table_new( num_of_rows, num_of_cols, FALSE ); gtk_table_set_col_spacings( GTK_TABLE(table), 1 ); @@ -225,7 +225,7 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, gtk_container_add( GTK_CONTAINER(m_widget), table ); wxString label; - GSList *radio_button_group = (GSList *) NULL; + GSList *radio_button_group = NULL; for (int i = 0; i < n; i++) { if ( i != 0 ) @@ -551,7 +551,7 @@ void wxRadioBox::ApplyToolTip( GtkTooltips *tips, const wxChar *tip ) while (node) { GtkWidget *widget = GTK_WIDGET( node->GetData() ); - gtk_tooltips_set_tip( tips, widget, wxConvCurrent->cWX2MB(tip), (gchar*) NULL ); + gtk_tooltips_set_tip( tips, widget, wxConvCurrent->cWX2MB(tip), NULL ); node = node->GetNext(); } } diff --git a/src/gtk1/radiobut.cpp b/src/gtk1/radiobut.cpp index 9367e3fde1..73968dc43b 100644 --- a/src/gtk1/radiobut.cpp +++ b/src/gtk1/radiobut.cpp @@ -87,7 +87,7 @@ bool wxRadioButton::Create( wxWindow *parent, if (!HasFlag(wxRB_GROUP)) { // search backward for last group start - wxRadioButton *chief = (wxRadioButton*) NULL; + wxRadioButton *chief = NULL; wxWindowList::compatibility_iterator node = parent->GetChildren().GetLast(); while (node) { diff --git a/src/gtk1/region.cpp b/src/gtk1/region.cpp index de01c37e53..ab656a06db 100644 --- a/src/gtk1/region.cpp +++ b/src/gtk1/region.cpp @@ -355,7 +355,7 @@ wxRegionContain wxRegion::DoContainsRect(const wxRect& r) const GdkRegion *wxRegion::GetRegion() const { if (!m_refData) - return (GdkRegion*) NULL; + return NULL; return M_REGIONDATA->m_region; } diff --git a/src/gtk1/renderer.cpp b/src/gtk1/renderer.cpp index beb39a217f..96ceee484a 100644 --- a/src/gtk1/renderer.cpp +++ b/src/gtk1/renderer.cpp @@ -287,7 +287,7 @@ wxRendererGTK::DrawSplitterSash(wxWindow *win, GTK_PIZZA(win->m_wxwindow)->bin_window, GTK_STATE_NORMAL, GTK_SHADOW_OUT, - (GdkRectangle*) NULL, + NULL, win->m_wxwindow, (char *)"paned", // const_cast isVert ? position : size.x - 2*SASH_SIZE, diff --git a/src/gtk1/scrolbar.cpp b/src/gtk1/scrolbar.cpp index ea6a98e71f..82ad187aa6 100644 --- a/src/gtk1/scrolbar.cpp +++ b/src/gtk1/scrolbar.cpp @@ -188,9 +188,9 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, m_oldPos = 0.0; if ((style & wxSB_VERTICAL) == wxSB_VERTICAL) - m_widget = gtk_vscrollbar_new( (GtkAdjustment *) NULL ); + m_widget = gtk_vscrollbar_new( NULL ); else - m_widget = gtk_hscrollbar_new( (GtkAdjustment *) NULL ); + m_widget = gtk_hscrollbar_new( NULL ); m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) ); diff --git a/src/gtk1/slider.cpp b/src/gtk1/slider.cpp index f704d40817..7a7a4f0e6b 100644 --- a/src/gtk1/slider.cpp +++ b/src/gtk1/slider.cpp @@ -145,9 +145,9 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, m_oldPos = 0.0; if (style & wxSL_VERTICAL) - m_widget = gtk_vscale_new( (GtkAdjustment *) NULL ); + m_widget = gtk_vscale_new( NULL ); else - m_widget = gtk_hscale_new( (GtkAdjustment *) NULL ); + m_widget = gtk_hscale_new( NULL ); if (style & wxSL_LABELS) { diff --git a/src/gtk1/statbmp.cpp b/src/gtk1/statbmp.cpp index 03a0f9682a..afd002c187 100644 --- a/src/gtk1/statbmp.cpp +++ b/src/gtk1/statbmp.cpp @@ -74,7 +74,7 @@ void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap ) if (m_bitmap.Ok()) { - GdkBitmap *mask = (GdkBitmap *) NULL; + GdkBitmap *mask = NULL; if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); diff --git a/src/gtk1/tbargtk.cpp b/src/gtk1/tbargtk.cpp index f45f4e9112..9924462303 100644 --- a/src/gtk1/tbargtk.cpp +++ b/src/gtk1/tbargtk.cpp @@ -125,7 +125,7 @@ public: if (bitmap.Ok()) { GdkBitmap *mask = bitmap.GetMask() ? bitmap.GetMask()->GetBitmap() - : (GdkBitmap *)NULL; + : NULL; gtk_pixmap_set( GTK_PIXMAP(m_pixmap), bitmap.GetPixmap(), mask ); } } @@ -230,7 +230,7 @@ static void wxInsertChildInToolBar( wxToolBar* WXUNUSED(parent), void wxToolBarTool::Init() { m_item = - m_pixmap = (GtkWidget *)NULL; + m_pixmap = NULL; } wxToolBarToolBase *wxToolBar::CreateTool(int id, @@ -258,7 +258,7 @@ wxToolBar::CreateTool(wxControl *control, const wxString& label) void wxToolBar::Init() { - m_toolbar = (GtkToolbar *)NULL; + m_toolbar = NULL; m_blockEvent = false; m_defaultWidth = 32; m_defaultHeight = 32; @@ -366,11 +366,11 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase) wxCHECK_MSG( bitmap.GetPixmap() != NULL, false, wxT("wxToolBar::Add needs a wxBitmap") ); - GtkWidget *tool_pixmap = (GtkWidget *)NULL; + GtkWidget *tool_pixmap = NULL; GdkPixmap *pixmap = bitmap.GetPixmap(); - GdkBitmap *mask = (GdkBitmap *)NULL; + GdkBitmap *mask = NULL; if ( bitmap.GetMask() ) mask = bitmap.GetMask()->GetBitmap(); @@ -556,7 +556,7 @@ wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord WXUNUSED(x), // VZ: GTK+ doesn't seem to have such thing wxFAIL_MSG( _T("wxToolBar::FindToolForPosition() not implemented") ); - return (wxToolBarToolBase *)NULL; + return NULL; } void wxToolBar::SetMargins( int x, int y ) diff --git a/src/gtk1/textctrl.cpp b/src/gtk1/textctrl.cpp index c2c52adef7..7fc484906b 100644 --- a/src/gtk1/textctrl.cpp +++ b/src/gtk1/textctrl.cpp @@ -223,7 +223,7 @@ void wxTextCtrl::Init() m_modified = false; SetUpdateFont(false); m_text = - m_vScrollbar = (GtkWidget *)NULL; + m_vScrollbar = NULL; } wxTextCtrl::~wxTextCtrl() @@ -271,7 +271,7 @@ bool wxTextCtrl::Create( wxWindow *parent, if (multi_line) { // create our control ... - m_text = gtk_text_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL ); + m_text = gtk_text_new( NULL, NULL ); // ... and put into the upper left hand corner of the table bool bHasHScrollbar = false; @@ -1246,7 +1246,7 @@ void wxTextCtrl::OnInternalIdle() if (cursor.Ok()) { - GdkWindow *window = (GdkWindow*) NULL; + GdkWindow *window = NULL; if (HasFlag(wxTE_MULTILINE)) window = GTK_TEXT(m_text)->text_area; else diff --git a/src/gtk1/tglbtn.cpp b/src/gtk1/tglbtn.cpp index a3cd62115b..e801bb373c 100644 --- a/src/gtk1/tglbtn.cpp +++ b/src/gtk1/tglbtn.cpp @@ -136,7 +136,7 @@ void wxToggleBitmapButton::OnSetBitmap() { if (!m_bitmap.Ok()) return; - GdkBitmap *mask = (GdkBitmap *) NULL; + GdkBitmap *mask = NULL; if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); GtkWidget *child = BUTTON_CHILD(m_widget); diff --git a/src/gtk1/tooltip.cpp b/src/gtk1/tooltip.cpp index 28d243f789..bf98adb334 100644 --- a/src/gtk1/tooltip.cpp +++ b/src/gtk1/tooltip.cpp @@ -24,7 +24,7 @@ // global data //----------------------------------------------------------------------------- -static GtkTooltips *ss_tooltips = (GtkTooltips*) NULL; +static GtkTooltips *ss_tooltips = NULL; //----------------------------------------------------------------------------- // wxToolTip @@ -35,7 +35,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxToolTip, wxObject) wxToolTip::wxToolTip( const wxString &tip ) { m_text = tip; - m_window = (wxWindow*) NULL; + m_window = NULL; } void wxToolTip::SetTip( const wxString &tip ) @@ -56,7 +56,7 @@ void wxToolTip::Apply( wxWindow *win ) m_window = win; if (m_text.empty()) - m_window->ApplyToolTip( ss_tooltips, (wxChar*) NULL ); + m_window->ApplyToolTip( ss_tooltips, NULL ); else m_window->ApplyToolTip( ss_tooltips, m_text ); } diff --git a/src/gtk1/toplevel.cpp b/src/gtk1/toplevel.cpp index 0a690c2e07..ccc04cf391 100644 --- a/src/gtk1/toplevel.cpp +++ b/src/gtk1/toplevel.cpp @@ -66,8 +66,8 @@ extern wxWindowGTK *g_delayedFocus; // the frame that is currently active (i.e. its child has focus). It is // used to generate wxActivateEvents -static wxTopLevelWindowGTK *g_activeFrame = (wxTopLevelWindowGTK*) NULL; -static wxTopLevelWindowGTK *g_lastActiveFrame = (wxTopLevelWindowGTK*) NULL; +static wxTopLevelWindowGTK *g_activeFrame = NULL; +static wxTopLevelWindowGTK *g_lastActiveFrame = NULL; // if we detect that the app has got/lost the focus, we set this variable to // either TRUE or FALSE and an activate event will be sent during the next @@ -455,7 +455,7 @@ void wxTopLevelWindowGTK::Init() m_sizeSet = false; m_miniEdge = 0; m_miniTitle = 0; - m_mainWidget = (GtkWidget*) NULL; + m_mainWidget = NULL; m_insertInClientArea = true; m_isIconized = false; m_fsIsShowing = false; @@ -990,7 +990,7 @@ void wxTopLevelWindowGTK::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), : maxHeight ; gtk_window_set_geometry_hints( GTK_WINDOW(m_widget), - (GtkWidget*) NULL, + NULL, &geom, (GdkWindowHints) flag ); @@ -1103,10 +1103,10 @@ void wxTopLevelWindowGTK::SetIcons( const wxIconBundle &icons ) if (icon.Ok()) { wxMask *mask = icon.GetMask(); - GdkBitmap *bm = (GdkBitmap *) NULL; + GdkBitmap *bm = NULL; if (mask) bm = mask->GetBitmap(); - gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm ); + gdk_window_set_icon( m_widget->window, NULL, icon.GetPixmap(), bm ); } wxSetIconsX11( (WXDisplay*)GDK_WINDOW_XDISPLAY( window ), diff --git a/src/gtk1/utilsgtk.cpp b/src/gtk1/utilsgtk.cpp index 727106633c..f49cf64931 100644 --- a/src/gtk1/utilsgtk.cpp +++ b/src/gtk1/utilsgtk.cpp @@ -106,7 +106,7 @@ void wxDisplaySizeMM( int *width, int *height ) void wxGetMousePosition( int* x, int* y ) { - gdk_window_get_pointer( (GdkWindow*) NULL, x, y, (GdkModifierType*) NULL ); + gdk_window_get_pointer( NULL, x, y, NULL ); } bool wxColourDisplay() diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 1924cc9fe2..7061e1ee6b 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -207,19 +207,19 @@ static GdkGC *g_eraseGC = NULL; // mouse capture state: the window which has it and if the mouse is currently // inside it -static wxWindowGTK *g_captureWindow = (wxWindowGTK*) NULL; +static wxWindowGTK *g_captureWindow = NULL; static bool g_captureWindowHasMouse = false; -wxWindowGTK *g_focusWindow = (wxWindowGTK*) NULL; +wxWindowGTK *g_focusWindow = NULL; // the last window which had the focus - this is normally never NULL (except // if we never had focus at all) as even when g_focusWindow is NULL it still // keeps its previous value -wxWindowGTK *g_focusWindowLast = (wxWindowGTK*) NULL; +wxWindowGTK *g_focusWindowLast = NULL; // If a window get the focus set but has not been realized // yet, defer setting the focus to idle time. -wxWindowGTK *g_delayedFocus = (wxWindowGTK*) NULL; +wxWindowGTK *g_delayedFocus = NULL; // hack: we need something to pass to gtk_menu_popup, so we store the time of // the last click here (extern: used from gtk/menu.cpp) @@ -227,7 +227,7 @@ guint32 wxGtkTimeLastClick = 0; // global variables because GTK+ DnD want to have the // mouse event that caused it -GdkEvent *g_lastMouseEvent = (GdkEvent*) NULL; +GdkEvent *g_lastMouseEvent = NULL; int g_lastButtonNumber = 0; extern bool g_mainThreadLocked; @@ -294,7 +294,7 @@ wxWindow *wxFindFocusedChild(wxWindowGTK *win) { wxWindow *winFocus = wxWindowGTK::FindFocus(); if ( !winFocus ) - return (wxWindow *)NULL; + return NULL; if ( winFocus == win ) return (wxWindow *)win; @@ -308,7 +308,7 @@ wxWindow *wxFindFocusedChild(wxWindowGTK *win) return child; } - return (wxWindow *)NULL; + return NULL; } static void draw_frame( GtkWidget *widget, wxWindowGTK *win ) @@ -611,7 +611,7 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle child_area; if (gtk_widget_intersect (child->widget, rect, &child_area)) { - gtk_widget_draw (child->widget, &child_area /* (GdkRectangle*) NULL*/ ); + gtk_widget_draw (child->widget, &child_area /* NULL*/ ); } } #endif @@ -1433,7 +1433,7 @@ wxWindowGTK *FindWindowForMouseEvent(wxWindowGTK *win, wxCoord& x, wxCoord& y) } else { - if ((child->m_wxwindow == (GtkWidget*) NULL) && + if ((child->m_wxwindow == NULL) && (child->m_x <= xx) && (child->m_y <= yy) && (child->m_x+child->m_width >= xx) && @@ -1879,7 +1879,7 @@ static gint gtk_window_focus_out_callback( GtkWidget *WXUNUSED(widget), if ( winFocus ) win = winFocus; - g_focusWindow = (wxWindowGTK *)NULL; + g_focusWindow = NULL; #ifdef HAVE_XIM if (win->m_ic) @@ -2424,9 +2424,9 @@ wxMouseState wxGetMouseState() void wxWindowGTK::Init() { // GTK specific - m_widget = (GtkWidget *) NULL; - m_wxwindow = (GtkWidget *) NULL; - m_focusWidget = (GtkWidget *) NULL; + m_widget = NULL; + m_wxwindow = NULL; + m_focusWidget = NULL; // position/size m_x = 0; @@ -2445,8 +2445,8 @@ void wxWindowGTK::Init() m_hasScrolling = false; m_isScrolling = false; - m_hAdjust = (GtkAdjustment*) NULL; - m_vAdjust = (GtkAdjustment*) NULL; + m_hAdjust = NULL; + m_vAdjust = NULL; m_oldHorizontalPos = m_oldVerticalPos = 0.0; m_oldClientWidth = @@ -2466,8 +2466,8 @@ void wxWindowGTK::Init() m_cursor = *wxSTANDARD_CURSOR; #ifdef HAVE_XIM - m_ic = (GdkIC*) NULL; - m_icattr = (GdkICAttr*) NULL; + m_ic = NULL; + m_icattr = NULL; #endif } @@ -2509,7 +2509,7 @@ bool wxWindowGTK::Create( wxWindow *parent, m_insertCallback = wxInsertChildInWindow; - m_widget = gtk_scrolled_window_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL ); + m_widget = gtk_scrolled_window_new( NULL, NULL ); GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS ); GtkScrolledWindow *scrolledWindow = GTK_SCROLLED_WINDOW(m_widget); @@ -2642,13 +2642,13 @@ wxWindowGTK::~wxWindowGTK() if (m_wxwindow) { gtk_widget_destroy( m_wxwindow ); - m_wxwindow = (GtkWidget*) NULL; + m_wxwindow = NULL; } if (m_widget) { gtk_widget_destroy( m_widget ); - m_widget = (GtkWidget*) NULL; + m_widget = NULL; } } @@ -3138,7 +3138,7 @@ void wxWindowGTK::DoClientToScreen( int *x, int *y ) const if (!m_widget->window) return; - GdkWindow *source = (GdkWindow *) NULL; + GdkWindow *source = NULL; if (m_wxwindow) source = GTK_PIZZA(m_wxwindow)->bin_window; else @@ -3167,7 +3167,7 @@ void wxWindowGTK::DoScreenToClient( int *x, int *y ) const if (!m_widget->window) return; - GdkWindow *source = (GdkWindow *) NULL; + GdkWindow *source = NULL; if (m_wxwindow) source = GTK_PIZZA(m_wxwindow)->bin_window; else @@ -3431,7 +3431,7 @@ void wxWindowGTK::WarpPointer( int x, int y ) // We provide this function ourselves as it is // missing in GDK (top of this file). - GdkWindow *window = (GdkWindow*) NULL; + GdkWindow *window = NULL; if (m_wxwindow) window = GTK_PIZZA(m_wxwindow)->bin_window; else @@ -3505,7 +3505,7 @@ void wxWindowGTK::Refresh( bool eraseBackground, const wxRect *rect ) } else { - gtk_widget_draw( m_widget, (GdkRectangle*) NULL ); + gtk_widget_draw( m_widget, NULL ); } } } @@ -3695,7 +3695,7 @@ void wxWindowGTK::DoSetToolTip( wxToolTip *tip ) void wxWindowGTK::ApplyToolTip( GtkTooltips *tips, const wxChar *tip ) { wxString tmp( tip ); - gtk_tooltips_set_tip( tips, GetConnectWidget(), wxGTK_CONV(tmp), (gchar*) NULL ); + gtk_tooltips_set_tip( tips, GetConnectWidget(), wxGTK_CONV(tmp), NULL ); } #endif // wxUSE_TOOLTIPS @@ -3829,7 +3829,7 @@ bool wxWindowGTK::SetBackgroundStyle(wxBackgroundStyle style) if (style == wxBG_STYLE_CUSTOM) { - GdkWindow *window = (GdkWindow*) NULL; + GdkWindow *window = NULL; if (m_wxwindow) window = GTK_PIZZA(m_wxwindow)->bin_window; else @@ -3913,7 +3913,7 @@ void wxWindowGTK::DoCaptureMouse() { wxCHECK_RET( m_widget != NULL, wxT("invalid window") ); - GdkWindow *window = (GdkWindow*) NULL; + GdkWindow *window = NULL; if (m_wxwindow) window = GTK_PIZZA(m_wxwindow)->bin_window; else @@ -3931,7 +3931,7 @@ void wxWindowGTK::DoCaptureMouse() GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_POINTER_MOTION_MASK), - (GdkWindow *) NULL, + NULL, cursor->GetCursor(), (guint32)GDK_CURRENT_TIME ); g_captureWindow = this; @@ -3944,9 +3944,9 @@ void wxWindowGTK::DoReleaseMouse() wxCHECK_RET( g_captureWindow, wxT("can't release mouse - not captured") ); - g_captureWindow = (wxWindowGTK*) NULL; + g_captureWindow = NULL; - GdkWindow *window = (GdkWindow*) NULL; + GdkWindow *window = NULL; if (m_wxwindow) window = GTK_PIZZA(m_wxwindow)->bin_window; else diff --git a/src/html/helpdata.cpp b/src/html/helpdata.cpp index 0e8bc843df..96f4e23cab 100644 --- a/src/html/helpdata.cpp +++ b/src/html/helpdata.cpp @@ -284,7 +284,7 @@ bool wxHtmlHelpData::LoadMSProject(wxHtmlBookRecord *book, wxFileSystem& fsys, HP_TagHandler *handler = new HP_TagHandler(book); parser.AddTagHandler(handler); - f = ( contentsfile.empty() ? (wxFSFile*) NULL : fsys.OpenFile(contentsfile) ); + f = ( contentsfile.empty() ? NULL : fsys.OpenFile(contentsfile) ); if (f) { buf.clear(); @@ -298,7 +298,7 @@ bool wxHtmlHelpData::LoadMSProject(wxHtmlBookRecord *book, wxFileSystem& fsys, wxLogError(_("Cannot open contents file: %s"), contentsfile.c_str()); } - f = ( indexfile.empty() ? (wxFSFile*) NULL : fsys.OpenFile(indexfile) ); + f = ( indexfile.empty() ? NULL : fsys.OpenFile(indexfile) ); if (f) { buf.clear(); diff --git a/src/html/helpfrm.cpp b/src/html/helpfrm.cpp index e8990b8d23..015489ae06 100644 --- a/src/html/helpfrm.cpp +++ b/src/html/helpfrm.cpp @@ -81,7 +81,7 @@ void wxHtmlHelpFrame::Init(wxHtmlHelpData* data) // Simply pass the pointer on to the help window m_Data = data; m_HtmlHelpWin = NULL; - m_helpController = (wxHtmlHelpController*) NULL; + m_helpController = NULL; } void wxHtmlHelpFrame::SetController(wxHtmlHelpController* controller) diff --git a/src/html/helpwnd.cpp b/src/html/helpwnd.cpp index e350f6e1b4..8c8b10c3ed 100644 --- a/src/html/helpwnd.cpp +++ b/src/html/helpwnd.cpp @@ -297,7 +297,7 @@ void wxHtmlHelpWindow::Init(wxHtmlHelpData* data) m_PagesHash = NULL; m_UpdateContents = true; m_toolBar = NULL; - m_helpController = (wxHtmlHelpController*) NULL; + m_helpController = NULL; } // Create: builds the GUI components. diff --git a/src/mgl/bitmap.cpp b/src/mgl/bitmap.cpp index b58ad78567..013e9f4674 100644 --- a/src/mgl/bitmap.cpp +++ b/src/mgl/bitmap.cpp @@ -323,7 +323,7 @@ int wxBitmap::GetDepth() const wxMask *wxBitmap::GetMask() const { - wxCHECK_MSG( Ok(), (wxMask *) NULL, wxT("invalid bitmap") ); + wxCHECK_MSG( Ok(), NULL, wxT("invalid bitmap") ); return M_BMPDATA->m_mask; } diff --git a/src/mgl/cursor.cpp b/src/mgl/cursor.cpp index bcef548906..eedb0085dc 100644 --- a/src/mgl/cursor.cpp +++ b/src/mgl/cursor.cpp @@ -43,7 +43,7 @@ class wxCursorRefData: public wxObjectRefData wxCursorRefData::wxCursorRefData() { - m_cursor = (MGLCursor*) NULL; + m_cursor = NULL; } wxCursorRefData::~wxCursorRefData() diff --git a/src/mgl/pen.cpp b/src/mgl/pen.cpp index 10af321572..2f1e42feec 100644 --- a/src/mgl/pen.cpp +++ b/src/mgl/pen.cpp @@ -68,7 +68,7 @@ wxPenRefData::wxPenRefData() m_style = wxPENSTYLE_SOLID; m_joinStyle = wxJOIN_ROUND; m_capStyle = wxCAP_ROUND; - m_dash = (wxDash*) NULL; + m_dash = NULL; m_countDashes = 0; int x, y, c; diff --git a/src/motif/accel.cpp b/src/motif/accel.cpp index 4f8cd0311c..3aad0fb5b5 100644 --- a/src/motif/accel.cpp +++ b/src/motif/accel.cpp @@ -40,19 +40,19 @@ public: wxAcceleratorRefData::wxAcceleratorRefData() { m_count = 0; - m_entries = (wxAcceleratorEntry*) NULL; + m_entries = NULL; } wxAcceleratorRefData::~wxAcceleratorRefData() { delete[] m_entries; - m_entries = (wxAcceleratorEntry*) NULL; + m_entries = NULL; m_count = 0; } wxAcceleratorTable::wxAcceleratorTable() { - m_refData = (wxAcceleratorRefData*) NULL; + m_refData = NULL; } wxAcceleratorTable::~wxAcceleratorTable() @@ -82,7 +82,7 @@ wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[] bool wxAcceleratorTable::IsOk() const { - return (m_refData != (wxAcceleratorRefData*) NULL); + return (m_refData != NULL); } int wxAcceleratorTable::GetCount() const diff --git a/src/motif/bmpmotif.cpp b/src/motif/bmpmotif.cpp index 525bc355a0..9b75f1c8d4 100644 --- a/src/motif/bmpmotif.cpp +++ b/src/motif/bmpmotif.cpp @@ -74,7 +74,7 @@ void wxBitmapCache::SetBitmap( const wxBitmap& bitmap ) { XmUninstallImage( (XImage*)m_image ); XtFree( (char*)(XImage*)m_image ); - m_image = (WXImage*)NULL; + m_image = NULL; } } } @@ -263,7 +263,7 @@ XCreateInsensitivePixmap( Display *display, Pixmap pixmap ) stipple = XCreateBitmapFromData( display, pixmap, stipple_data, 16, 16 ); if ( 0 != stipple ) { - gc = XCreateGC( display, pixmap, (XtGCMask)0, (XGCValues*)NULL ); + gc = XCreateGC( display, pixmap, (XtGCMask)0, NULL ); if ( NULL != gc ) { /* Create an identical copy of the argument pixmap. diff --git a/src/motif/checkbox.cpp b/src/motif/checkbox.cpp index f2132d5122..b41bd1cf1e 100644 --- a/src/motif/checkbox.cpp +++ b/src/motif/checkbox.cpp @@ -144,7 +144,7 @@ void wxCheckBox::ChangeBackgroundColour() return; wxComputeColours (XtDisplay((Widget) m_mainWidget), & m_backgroundColour, - (wxColour*) NULL); + NULL); XtVaSetValues ((Widget) m_mainWidget, XmNbackground, g_itemColors[wxBACK_INDEX].pixel, diff --git a/src/motif/dcclient.cpp b/src/motif/dcclient.cpp index c731110b7e..4622070bb8 100644 --- a/src/motif/dcclient.cpp +++ b/src/motif/dcclient.cpp @@ -141,11 +141,11 @@ void wxWindowDCImpl::Init() m_currentPenWidth = 1; m_currentPenJoin = -1; m_currentPenDashCount = -1; - m_currentPenDash = (wxX11Dash*) NULL; + m_currentPenDash = NULL; m_currentStyle = -1; m_currentFill = -1; m_colour = wxColourDisplay(); - m_display = (WXDisplay*) NULL; + m_display = NULL; m_pixmap = (WXPixmap) 0; m_autoSetting = 0; m_ok = false; @@ -161,7 +161,7 @@ wxWindowDCImpl::wxWindowDCImpl(wxDC *owner) wxWindowDCImpl::wxWindowDCImpl(wxDC *owner, wxWindow *window) : wxMotifDCImpl(owner) { - wxASSERT_MSG( (window != (wxWindow*) NULL), "You must pass a valid wxWindow to wxWindowDCImpl/wxClientDCImpl/wxPaintDCImpl constructor." ); + wxASSERT_MSG( (window != NULL), "You must pass a valid wxWindow to wxWindowDCImpl/wxClientDCImpl/wxPaintDCImpl constructor." ); Init(); @@ -836,7 +836,7 @@ bool wxWindowDCImpl::DoBlit( wxCoord xdest, wxCoord ydest, // Do bitmap scaling if necessary - wxBitmap *scaledBitmap = (wxBitmap*) NULL; + wxBitmap *scaledBitmap = NULL; Pixmap sourcePixmap = (Pixmap) NULL; double scaleX, scaleY; GetUserScale(& scaleX, & scaleY); @@ -1584,7 +1584,7 @@ void wxWindowDCImpl::SetPen( const wxPen &pen ) case wxTRANSPARENT: default: style = LineSolid; - req_dash = (wxX11Dash*)NULL; + req_dash = NULL; req_nb_dash = 0; } diff --git a/src/motif/dnd.cpp b/src/motif/dnd.cpp index 2a408c438f..cba4d6c9da 100644 --- a/src/motif/dnd.cpp +++ b/src/motif/dnd.cpp @@ -129,7 +129,7 @@ wxDropSource::wxDropSource( wxWindow *win ) { #if 0 m_window = win; - m_data = (wxDataObject *) NULL; + m_data = NULL; m_retValue = wxDragCancel; m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY ); diff --git a/src/motif/filedlg.cpp b/src/motif/filedlg.cpp index 490f92fb23..974b18b796 100644 --- a/src/motif/filedlg.cpp +++ b/src/motif/filedlg.cpp @@ -168,7 +168,7 @@ int wxFileDialog::ShowModal() if (m_backgroundColour.Ok()) { - wxComputeColours (dpy, & m_backgroundColour, (wxColour*) NULL); + wxComputeColours (dpy, & m_backgroundColour, NULL); XtSetArg(args[ac], XmNbackground, g_itemColors[wxBACK_INDEX].pixel); ac++; XtSetArg(args[ac], XmNtopShadowColor, g_itemColors[wxTOPS_INDEX].pixel); ac++; diff --git a/src/motif/font.cpp b/src/motif/font.cpp index 53cf1c2a3f..df62b908ba 100644 --- a/src/motif/font.cpp +++ b/src/motif/font.cpp @@ -492,7 +492,7 @@ wxFontEncoding wxFont::GetEncoding() const const wxNativeFontInfo *wxFont::GetNativeFontInfo() const { - wxCHECK_MSG( Ok(), (wxNativeFontInfo *)NULL, wxT("invalid font") ); + wxCHECK_MSG( Ok(), NULL, wxT("invalid font") ); if(M_FONTDATA->m_nativeFontInfo.GetXFontName().empty()) GetInternalFont(); @@ -510,7 +510,7 @@ const wxNativeFontInfo *wxFont::GetNativeFontInfo() const wxXFont* wxFont::GetInternalFont(double scale, WXDisplay* display) const { if ( !Ok() ) - return (wxXFont *)NULL; + return NULL; long intScale = long(scale * 100.0 + 0.5); // key for wxXFont int pointSize = (M_FONTDATA->m_pointSize * 10 * intScale) / 100; @@ -541,7 +541,7 @@ wxXFont* wxFont::GetInternalFont(double scale, WXDisplay* display) const { wxFAIL_MSG( wxT("Could not allocate even a default font -- something is wrong.") ); - return (wxXFont*) NULL; + return NULL; } wxXFont* f = new wxXFont; diff --git a/src/motif/frame.cpp b/src/motif/frame.cpp index 184daa28e0..aa9c013680 100644 --- a/src/motif/frame.cpp +++ b/src/motif/frame.cpp @@ -508,7 +508,7 @@ void wxFrame::SetMenuBar(wxMenuBar *menuBar) } // Currently can't set it twice - // wxASSERT_MSG( (m_frameMenuBar == (wxMenuBar*) NULL), "Cannot set the menubar more than once"); + // wxASSERT_MSG( (m_frameMenuBar == NULL), "Cannot set the menubar more than once"); if (m_frameMenuBar) { diff --git a/src/motif/menu.cpp b/src/motif/menu.cpp index 6eae7b96dd..8c685b1e8f 100644 --- a/src/motif/menu.cpp +++ b/src/motif/menu.cpp @@ -72,7 +72,7 @@ void wxMenu::Init() m_popupShell = (WXWidget) NULL; m_buttonWidget = (WXWidget) NULL; m_menuId = 0; - m_topLevelMenu = (wxMenu*) NULL; + m_topLevelMenu = NULL; m_ownedByMenuBar = false; if ( !m_title.empty() ) @@ -383,7 +383,7 @@ bool wxMenuBar::DestroyMenuBar() { if (!m_mainWidget) { - SetMenuBarFrame((wxFrame*) NULL); + SetMenuBarFrame(NULL); return false; } @@ -400,7 +400,7 @@ bool wxMenuBar::DestroyMenuBar() XtDestroyWidget((Widget) m_mainWidget); m_mainWidget = (WXWidget) 0; - SetMenuBarFrame((wxFrame*) NULL); + SetMenuBarFrame(NULL); return true; } @@ -529,7 +529,7 @@ void wxMenu::DestroyMenu (bool full) node = node->GetNext() ) { wxMenuItem *item = node->GetData(); - item->SetMenuBar((wxMenuBar*) NULL); + item->SetMenuBar(NULL); item->DestroyItem(full); } @@ -555,7 +555,7 @@ WXWidget wxMenu::FindMenuItem (int id, wxMenuItem ** it) const if (id == m_menuId) { if (it) - *it = (wxMenuItem*) NULL; + *it = NULL; return m_buttonWidget; } @@ -582,7 +582,7 @@ WXWidget wxMenu::FindMenuItem (int id, wxMenuItem ** it) const } if (it) - *it = (wxMenuItem*) NULL; + *it = NULL; return (WXWidget) NULL; } diff --git a/src/motif/msgdlg.cpp b/src/motif/msgdlg.cpp index 49b7fb8468..5a7a63b83a 100644 --- a/src/motif/msgdlg.cpp +++ b/src/motif/msgdlg.cpp @@ -156,7 +156,7 @@ int wxMessageDialog::ShowModal() if (m_backgroundColour.Ok()) { - wxComputeColours (dpy, & m_backgroundColour, (wxColour*) NULL); + wxComputeColours (dpy, & m_backgroundColour, NULL); XtSetArg(args[ac], XmNbackground, g_itemColors[wxBACK_INDEX].pixel); ac++; XtSetArg(args[ac], XmNtopShadowColor, g_itemColors[wxTOPS_INDEX].pixel); ac++; diff --git a/src/motif/radiobut.cpp b/src/motif/radiobut.cpp index 5c38eaf30d..98741b960a 100644 --- a/src/motif/radiobut.cpp +++ b/src/motif/radiobut.cpp @@ -91,7 +91,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, else { /* search backward for last group start */ - wxRadioButton *chief = (wxRadioButton*) NULL; + wxRadioButton *chief = NULL; wxWindowList::compatibility_iterator node = parent->GetChildren().GetLast(); while (node) { diff --git a/src/motif/textctrl.cpp b/src/motif/textctrl.cpp index 666da47caa..92ea827279 100644 --- a/src/motif/textctrl.cpp +++ b/src/motif/textctrl.cpp @@ -90,7 +90,7 @@ static void wxTextWindowActivateProc(Widget w, XtPointer clientData, XmAnyCallba // Text item wxTextCtrl::wxTextCtrl() { - m_tempCallbackStruct = (void*) NULL; + m_tempCallbackStruct = NULL; m_modified = false; m_processedDefault = false; } @@ -108,7 +108,7 @@ bool wxTextCtrl::Create(wxWindow *parent, return false; PreCreation(); - m_tempCallbackStruct = (void*) NULL; + m_tempCallbackStruct = NULL; m_modified = false; m_processedDefault = false; diff --git a/src/motif/toolbar.cpp b/src/motif/toolbar.cpp index b6cebddc1b..75f4c0fbed 100644 --- a/src/motif/toolbar.cpp +++ b/src/motif/toolbar.cpp @@ -127,7 +127,7 @@ protected: // globals // ---------------------------------------------------------------------------- -static wxToolBarTimer* wxTheToolBarTimer = (wxToolBarTimer*) NULL; +static wxToolBarTimer* wxTheToolBarTimer = NULL; Widget wxToolBarTimer::help_popup = (Widget) 0; Widget wxToolBarTimer::buttonWidget = (Widget) 0; @@ -480,7 +480,7 @@ wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord WXUNUSED(x), { wxFAIL_MSG( _T("TODO") ); - return (wxToolBarToolBase *)NULL; + return NULL; } bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *tool) @@ -652,7 +652,7 @@ wxToolBarToolBase *wxToolBar::FindToolByWidget(WXWidget w) const node = node->GetNext(); } - return (wxToolBarToolBase *)NULL; + return NULL; } static void wxToolButtonCallback(Widget w, diff --git a/src/motif/utils.cpp b/src/motif/utils.cpp index e5ba829b5d..4eda0e2f08 100644 --- a/src/motif/utils.cpp +++ b/src/motif/utils.cpp @@ -542,7 +542,7 @@ void wxDoChangeBackgroundColour(WXWidget widget, const wxColour& backgroundColou return; wxComputeColours (XtDisplay((Widget) widget), & backgroundColour, - (wxColour*) NULL); + NULL); XtVaSetValues ((Widget) widget, XmNbackground, g_itemColors[wxBACK_INDEX].pixel, diff --git a/src/motif/window.cpp b/src/motif/window.cpp index 17634160d4..32f3dabc2e 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -557,7 +557,7 @@ wxWindow *wxWindowBase::DoFindFocus() // currently active. // (2) The widget with the focus may not be in the widget table // depending on which widgets I put in the table - wxWindow *winFocus = (wxWindow *)NULL; + wxWindow *winFocus = NULL; for ( wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst(); node; node = node->GetNext() ) @@ -1864,7 +1864,7 @@ WXDisplay *wxWindow::GetXDisplay() const if ( wMain ) return (WXDisplay*) XtDisplay(wMain); else - return (WXDisplay*) NULL; + return NULL; } WXWidget wxWindow::GetMainWidget() const diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index 1e8ff645c6..6e7e0436f6 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -1175,13 +1175,13 @@ wxBitmap wxBitmap::GetSubBitmapOfHDC( const wxRect& rect, WXHDC hdc ) const wxPalette* wxBitmap::GetPalette() const { return GetBitmapData() ? &GetBitmapData()->m_bitmapPalette - : (wxPalette *) NULL; + : NULL; } #endif wxMask *wxBitmap::GetMask() const { - return GetBitmapData() ? GetBitmapData()->GetMask() : (wxMask *) NULL; + return GetBitmapData() ? GetBitmapData()->GetMask() : NULL; } wxBitmap wxBitmap::GetMaskBitmap() const @@ -1197,7 +1197,7 @@ wxBitmap wxBitmap::GetMaskBitmap() const wxDC *wxBitmap::GetSelectedInto() const { - return GetBitmapData() ? GetBitmapData()->m_selectedInto : (wxDC *) NULL; + return GetBitmapData() ? GetBitmapData()->m_selectedInto : NULL; } #endif diff --git a/src/msw/combo.cpp b/src/msw/combo.cpp index d27c1594d9..caf2fc428e 100644 --- a/src/msw/combo.cpp +++ b/src/msw/combo.cpp @@ -398,7 +398,7 @@ wxComboCtrl::PrepareBackground( wxDC& dc, const wxRect& rect, int flags ) const selRect.x += wcp + focusSpacingX; selRect.width -= wcp + (focusSpacingX*2); - //wxUxThemeEngine* theme = (wxUxThemeEngine*) NULL; + //wxUxThemeEngine* theme = NULL; //if ( hTheme ) // theme = wxUxThemeEngine::GetIfActive(); @@ -831,7 +831,7 @@ bool wxComboCtrl::AnimateShow( const wxRect& rect, int flags ) m_animTimer.SetOwner( this, wxID_ANY ); m_animTimer.Start( COMBOBOX_ANIMATION_RESOLUTION, wxTIMER_CONTINUOUS ); - OnTimerEvent(*((wxTimerEvent*)NULL)); // Event is never used, so we can give NULL + OnTimerEvent(*(NULL)); // Event is never used, so we can give NULL return false; } diff --git a/src/msw/cursor.cpp b/src/msw/cursor.cpp index 0583a2f209..ec25d16d04 100644 --- a/src/msw/cursor.cpp +++ b/src/msw/cursor.cpp @@ -106,7 +106,7 @@ public: virtual void OnExit() { delete gs_globalCursor; - gs_globalCursor = (wxCursor *)NULL; + gs_globalCursor = NULL; } }; diff --git a/src/msw/dde.cpp b/src/msw/dde.cpp index 550a8fc1cd..20bbe4bb23 100644 --- a/src/msw/dde.cpp +++ b/src/msw/dde.cpp @@ -418,7 +418,7 @@ wxConnectionBase *wxDDEClient::MakeConnection(const wxString& WXUNUSED(host), if ( !hszServer ) { - return (wxConnectionBase*) NULL; + return NULL; } @@ -427,7 +427,7 @@ wxConnectionBase *wxDDEClient::MakeConnection(const wxString& WXUNUSED(host), if ( !hszTopic ) { DDEFreeString(hszServer); - return (wxConnectionBase*) NULL; + return NULL; } @@ -457,7 +457,7 @@ wxConnectionBase *wxDDEClient::MakeConnection(const wxString& WXUNUSED(host), } } - return (wxConnectionBase*) NULL; + return NULL; } wxConnectionBase *wxDDEClient::OnMakeConnection() diff --git a/src/msw/dragimag.cpp b/src/msw/dragimag.cpp index 0f1aa1ebb7..d3c7c649e9 100644 --- a/src/msw/dragimag.cpp +++ b/src/msw/dragimag.cpp @@ -92,7 +92,7 @@ void wxDragImage::Init() #if !wxUSE_SIMPLER_DRAGIMAGE m_hCursorImageList = 0; #endif - m_window = (wxWindow*) NULL; + m_window = NULL; m_fullScreen = false; } @@ -388,7 +388,7 @@ bool wxDragImage::EndDrag() ::ShowCursor(TRUE); #endif - m_window = (wxWindow*) NULL; + m_window = NULL; return true; } diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 6b9cdbcc9a..32eb0a46b8 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -1136,7 +1136,7 @@ bool wxMDIChildFrame::HandleMDIActivate(long WXUNUSED(activate), wxActivateEvent event(wxEVT_ACTIVATE, activated, m_windowId); event.SetEventObject( this ); - ResetWindowStyle((void *)NULL); + ResetWindowStyle(NULL); return HandleWindowEvent(event); } diff --git a/src/msw/ole/automtn.cpp b/src/msw/ole/automtn.cpp index d10484a938..4580beea95 100644 --- a/src/msw/ole/automtn.cpp +++ b/src/msw/ole/automtn.cpp @@ -159,7 +159,7 @@ bool wxAutomationObject::Invoke(const wxString& member, int action, { namedArgCount = 1; dispIds[1] = DISPID_PROPERTYPUT; - vReturnPtr = (VARIANTARG*) NULL; + vReturnPtr = NULL; } // Convert the wxVariants to VARIANTARGs @@ -220,7 +220,7 @@ bool wxAutomationObject::Invoke(const wxString& member, int action, // Mustn't release the dispatch pointer if (vReturn.vt == VT_DISPATCH) { - vReturn.pdispVal = (IDispatch*) NULL; + vReturn.pdispVal = NULL; } ReleaseVariant(& vReturn); } @@ -440,7 +440,7 @@ WXIDISPATCH* wxAutomationObject::GetDispatchProperty(const wxString& property, i } } - return (WXIDISPATCH*) NULL; + return NULL; } // Uses DISPATCH_PROPERTYGET @@ -458,7 +458,7 @@ WXIDISPATCH* wxAutomationObject::GetDispatchProperty(const wxString& property, i } } - return (WXIDISPATCH*) NULL; + return NULL; } diff --git a/src/msw/printwin.cpp b/src/msw/printwin.cpp index 41e0c03621..99f2892758 100644 --- a/src/msw/printwin.cpp +++ b/src/msw/printwin.cpp @@ -286,7 +286,7 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt wxDC *wxWindowsPrinter::PrintDialog(wxWindow *parent) { - wxDC *dc = (wxPrinterDC*) NULL; + wxDC *dc = NULL; wxWindowsPrintDialog dialog(parent, & m_printDialogData); int ret = dialog.ShowModal(); diff --git a/src/msw/region.cpp b/src/msw/region.cpp index 3be6d5496c..f533f85e0d 100644 --- a/src/msw/region.cpp +++ b/src/msw/region.cpp @@ -92,7 +92,7 @@ private: wxRegion::wxRegion() { - m_refData = (wxRegionRefData *)NULL; + m_refData = NULL; } wxRegion::wxRegion(WXHRGN hRegion) diff --git a/src/msw/toolbar.cpp b/src/msw/toolbar.cpp index 6399465223..bdece22880 100644 --- a/src/msw/toolbar.cpp +++ b/src/msw/toolbar.cpp @@ -1422,7 +1422,7 @@ wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord x, wxCoord y) const // TB_HITTEST returns m_nButtons ( not -1 ) if ( index < 0 || (size_t)index >= m_nButtons ) // it's a separator or there is no tool at all there - return (wxToolBarToolBase *)NULL; + return NULL; // when TB_SETBUTTONINFO is available (both during compile- and run-time), // we don't use the dummy separators hack diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 0e53428192..4ab30907af 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -128,7 +128,7 @@ void wxTopLevelWindowMSW::Init() m_fsIsMaximized = false; m_fsIsShowing = false; - m_winLastFocused = (wxWindow *)NULL; + m_winLastFocused = NULL; #if defined(__SMARTPHONE__) && defined(__WXWINCE__) m_MenuBarHWND = 0; diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 199c04357e..ea0ffb19ac 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -6226,7 +6226,7 @@ extern wxWindow *wxGetWindowFromHWND(WXHWND hWnd) // For a radiobutton, we get the radiobox from GWL_USERDATA (which is set // by code in msw/radiobox.cpp), for all the others we just search up the // window hierarchy - wxWindow *win = (wxWindow *)NULL; + wxWindow *win = NULL; if ( hwnd ) { win = wxFindWinFromHandle(hwnd); diff --git a/src/os2/dcprint.cpp b/src/os2/dcprint.cpp index 6e92526a6f..0ee065231e 100644 --- a/src/os2/dcprint.cpp +++ b/src/os2/dcprint.cpp @@ -215,14 +215,14 @@ WXHDC WXDLLEXPORT wxGetPrinterDC( const wxPrintData& WXUNUSED(rPrintDataConst) ) wxPrintData printData = printDataConst; printData.ConvertToNative(); - wxChar* driverName = (wxChar*) NULL; + wxChar* driverName = NULL; wxString devNameStr = printData.GetPrinterName(); wxChar* deviceName; - wxChar* portName = (wxChar*) NULL; // Obsolete in WIN32 + wxChar* portName = NULL; // Obsolete in WIN32 if (devNameStr.empty()) - deviceName = (wxChar*) NULL; + deviceName = NULL; else deviceName = WXSTRINGCAST devNameStr; diff --git a/src/os2/dialog.cpp b/src/os2/dialog.cpp index abb905f2f8..8a56bef583 100644 --- a/src/os2/dialog.cpp +++ b/src/os2/dialog.cpp @@ -72,9 +72,9 @@ wxDEFINE_TIED_SCOPED_PTR_TYPE(wxDialogModalData); void wxDialog::Init() { - m_pOldFocus = (wxWindow *)NULL; + m_pOldFocus = NULL; m_isShown = false; - m_pWindowDisabler = (wxWindowDisabler *)NULL; + m_pWindowDisabler = NULL; m_modalData = NULL; SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); } // end of wxDialog::Init diff --git a/src/os2/frame.cpp b/src/os2/frame.cpp index 98dbc1ba94..57db7ded28 100644 --- a/src/os2/frame.cpp +++ b/src/os2/frame.cpp @@ -499,7 +499,7 @@ bool wxFrame::ShowFullScreen( bool bShow, long lStyle ) if ((lStyle & wxFULLSCREEN_NOSTATUSBAR) && pTheStatusBar) { m_nFsStatusBarFields = pTheStatusBar->GetFieldsCount(); - SetStatusBar((wxStatusBar*) NULL); + SetStatusBar(NULL); delete pTheStatusBar; } else diff --git a/src/os2/gdiimage.cpp b/src/os2/gdiimage.cpp index 94d7e4fb89..06f1951f63 100644 --- a/src/os2/gdiimage.cpp +++ b/src/os2/gdiimage.cpp @@ -287,7 +287,7 @@ wxGDIImageHandler* wxGDIImage::FindHandler( return pHandler; pNode = pNode->GetNext(); } - return((wxGDIImageHandler*)NULL); + return(NULL); } wxGDIImageHandler* wxGDIImage::FindHandler( @@ -307,7 +307,7 @@ wxGDIImageHandler* wxGDIImage::FindHandler( } pNode = pNode->GetNext(); } - return((wxGDIImageHandler*)NULL); + return(NULL); } wxGDIImageHandler* wxGDIImage::FindHandler( @@ -324,7 +324,7 @@ wxGDIImageHandler* wxGDIImage::FindHandler( return pHandler; pNode = pNode->GetNext(); } - return((wxGDIImageHandler*)NULL); + return(NULL); } void wxGDIImage::CleanUpHandlers() diff --git a/src/os2/toolbar.cpp b/src/os2/toolbar.cpp index e07ee3e356..ebceb00abb 100644 --- a/src/os2/toolbar.cpp +++ b/src/os2/toolbar.cpp @@ -979,7 +979,7 @@ wxToolBarToolBase* wxToolBar::FindToolForPosition( } node = node->GetNext(); } - return (wxToolBarToolBase *)NULL; + return NULL; } // end of wxToolBar::FindToolForPosition // ---------------------------------------------------------------------------- diff --git a/src/os2/toplevel.cpp b/src/os2/toplevel.cpp index ff1c6d70e9..38d204d14b 100644 --- a/src/os2/toplevel.cpp +++ b/src/os2/toplevel.cpp @@ -150,7 +150,7 @@ void wxTopLevelWindowOS2::Init() m_hFrame = NULLHANDLE; memset(&m_vSwp, 0, sizeof(SWP)); memset(&m_vSwpClient, 0, sizeof(SWP)); - m_pWinLastFocused = (wxWindow *)NULL; + m_pWinLastFocused = NULL; } // end of wxTopLevelWindowIOS2::Init void wxTopLevelWindowOS2::OnActivate( diff --git a/src/os2/window.cpp b/src/os2/window.cpp index 74490afd45..409b6117f6 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -545,7 +545,7 @@ void wxWindowOS2::DoReleaseMouse() /* static */ wxWindow* wxWindowBase::GetCapture() { HWND hwnd = ::WinQueryCapture(HWND_DESKTOP); - return hwnd ? wxFindWinFromHandle((WXHWND)hwnd) : (wxWindow *)NULL; + return hwnd ? wxFindWinFromHandle((WXHWND)hwnd) : NULL; } // end of wxWindowBase::GetCapture bool wxWindowOS2::SetFont( const wxFont& rFont ) diff --git a/src/osx/carbon/clipbrd.cpp b/src/osx/carbon/clipbrd.cpp index 56ad3acfe9..8bc1f65703 100644 --- a/src/osx/carbon/clipbrd.cpp +++ b/src/osx/carbon/clipbrd.cpp @@ -142,7 +142,7 @@ void wxClipboard::Close() if (m_data) { delete m_data; - m_data = (wxDataObject*) NULL; + m_data = NULL; } } diff --git a/src/osx/carbon/toolbar.cpp b/src/osx/carbon/toolbar.cpp index 6907c5f12b..43248edb9c 100644 --- a/src/osx/carbon/toolbar.cpp +++ b/src/osx/carbon/toolbar.cpp @@ -1506,7 +1506,7 @@ wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord x, wxCoord y) const node = node->GetNext(); } - return (wxToolBarToolBase*)NULL; + return NULL; } wxString wxToolBar::MacGetToolTipString( wxPoint &pt ) diff --git a/src/osx/carbon/tooltip.cpp b/src/osx/carbon/tooltip.cpp index f7b4857e9e..92054cbaee 100644 --- a/src/osx/carbon/tooltip.cpp +++ b/src/osx/carbon/tooltip.cpp @@ -64,7 +64,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxToolTip, wxObject) wxToolTip::wxToolTip( const wxString &tip ) { m_text = tip; - m_window = (wxWindow*) NULL; + m_window = NULL; } wxToolTip::~wxToolTip() diff --git a/src/osx/cocoa/toolbar.mm b/src/osx/cocoa/toolbar.mm index 320f1017f4..50ff8949a4 100644 --- a/src/osx/cocoa/toolbar.mm +++ b/src/osx/cocoa/toolbar.mm @@ -1146,7 +1146,7 @@ wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord x, wxCoord y) const node = node->GetNext(); } - return (wxToolBarToolBase*)NULL; + return NULL; } wxString wxToolBar::MacGetToolTipString( wxPoint &pt ) diff --git a/src/osx/cocoa/tooltip.mm b/src/osx/cocoa/tooltip.mm index 4cb9e517c5..f2f0bd30f0 100644 --- a/src/osx/cocoa/tooltip.mm +++ b/src/osx/cocoa/tooltip.mm @@ -37,7 +37,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxToolTip, wxObject) wxToolTip::wxToolTip( const wxString &tip ) { m_text = tip; - m_window = (wxWindow*) NULL; + m_window = NULL; } wxToolTip::~wxToolTip() diff --git a/src/osx/core/bitmap.cpp b/src/osx/core/bitmap.cpp index 563eaf515a..96a26525f9 100644 --- a/src/osx/core/bitmap.cpp +++ b/src/osx/core/bitmap.cpp @@ -1384,7 +1384,7 @@ int wxBitmap::GetDepth() const wxMask *wxBitmap::GetMask() const { - wxCHECK_MSG( Ok(), (wxMask *) NULL, wxT("invalid bitmap") ); + wxCHECK_MSG( Ok(), NULL, wxT("invalid bitmap") ); return M_BITMAPDATA->m_bitmapMask; } diff --git a/src/osx/core/printmac.cpp b/src/osx/core/printmac.cpp index c64891c3ff..463c61bd74 100644 --- a/src/osx/core/printmac.cpp +++ b/src/osx/core/printmac.cpp @@ -562,7 +562,7 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt) wxDC* wxMacPrinter::PrintDialog(wxWindow *parent) { - wxDC* dc = (wxDC*) NULL; + wxDC* dc = NULL; wxPrintDialog dialog(parent, & m_printDialogData); int ret = dialog.ShowModal(); diff --git a/src/osx/menu_osx.cpp b/src/osx/menu_osx.cpp index c2ac17c2e9..281c0121db 100644 --- a/src/osx/menu_osx.cpp +++ b/src/osx/menu_osx.cpp @@ -501,7 +501,7 @@ void wxMenuBar::Init() { m_eventHandler = this; m_menuBarFrame = NULL; - m_invokingWindow = (wxWindow*) NULL; + m_invokingWindow = NULL; m_rootMenu = new wxMenu(); wxMenu* applemenu = new wxMenu(); applemenu->SetAllowRearrange(false); @@ -890,7 +890,7 @@ bool wxMenuBar::Append(wxMenu *menu, const wxString& title) static void wxMenubarUnsetInvokingWindow( wxMenu *menu ) { - menu->SetInvokingWindow( (wxWindow*) NULL ); + menu->SetInvokingWindow( NULL ); wxMenuItemList::compatibility_iterator node = menu->GetMenuItems().GetFirst(); while (node) @@ -921,7 +921,7 @@ static void wxMenubarSetInvokingWindow( wxMenu *menu, wxWindow *win ) void wxMenuBar::UnsetInvokingWindow() { - m_invokingWindow = (wxWindow*) NULL; + m_invokingWindow = NULL; wxMenu *menu; wxMenuList::compatibility_iterator node = m_menus.GetFirst(); diff --git a/src/osx/window_osx.cpp b/src/osx/window_osx.cpp index a2b6b42654..dc830c5116 100644 --- a/src/osx/window_osx.cpp +++ b/src/osx/window_osx.cpp @@ -153,7 +153,7 @@ wxWindowMac::~wxWindowMac() if ( frame ) { if ( frame->GetLastFocus() == this ) - frame->SetLastFocus((wxWindow*)NULL); + frame->SetLastFocus(NULL); break; } } diff --git a/src/palmos/bitmap.cpp b/src/palmos/bitmap.cpp index 674aa379a9..5c22928059 100644 --- a/src/palmos/bitmap.cpp +++ b/src/palmos/bitmap.cpp @@ -309,20 +309,20 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const #if wxUSE_PALETTE wxPalette* wxBitmap::GetPalette() const { - return (wxPalette *) NULL; + return NULL; } #endif wxMask *wxBitmap::GetMask() const { - return (wxMask *) NULL; + return NULL; } #ifdef __WXDEBUG__ wxDC *wxBitmap::GetSelectedInto() const { - return (wxDC *) NULL; + return NULL; } #endif diff --git a/src/palmos/choice.cpp b/src/palmos/choice.cpp index 36613fe84f..5ea2d6ea02 100644 --- a/src/palmos/choice.cpp +++ b/src/palmos/choice.cpp @@ -199,7 +199,7 @@ void wxChoice::DoSetItemClientData(unsigned int n, void* clientData) void* wxChoice::DoGetItemClientData(unsigned int n) const { - return (void *)NULL; + return NULL; } // ---------------------------------------------------------------------------- diff --git a/src/palmos/dir.cpp b/src/palmos/dir.cpp index e041f2f001..2883ef2649 100644 --- a/src/palmos/dir.cpp +++ b/src/palmos/dir.cpp @@ -127,7 +127,7 @@ void wxDirData::Close() bool wxDirData::Read(wxString *filename) { - //dirent *de = (dirent *)NULL; // just to silence compiler warnings + //dirent *de = NULL; // just to silence compiler warnings int ret; char tmpbuf[300]; bool matches = false; diff --git a/src/palmos/enhmeta.cpp b/src/palmos/enhmeta.cpp index 11ceeb2a38..f4ad5ca6fd 100644 --- a/src/palmos/enhmeta.cpp +++ b/src/palmos/enhmeta.cpp @@ -56,7 +56,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxEnhMetaFileDC, wxDC) // we must pass NULL if the string is empty to metafile functions static inline const wxChar *GetMetaFileName(const wxString& fn) - { return !fn ? (wxChar *)NULL : fn.c_str(); } + { return !fn ? NULL : fn.c_str(); } // ============================================================================ // implementation diff --git a/src/palmos/listbox.cpp b/src/palmos/listbox.cpp index 34d50d070c..fd23382ec9 100644 --- a/src/palmos/listbox.cpp +++ b/src/palmos/listbox.cpp @@ -200,7 +200,7 @@ bool wxListBox::IsSelected(int N) const void *wxListBox::DoGetItemClientData(unsigned int n) const { - return (void *)NULL; + return NULL; } void wxListBox::DoSetItemClientData(unsigned int n, void *clientData) diff --git a/src/palmos/printdlg.cpp b/src/palmos/printdlg.cpp index 842cf6a89a..bb60f74759 100644 --- a/src/palmos/printdlg.cpp +++ b/src/palmos/printdlg.cpp @@ -80,7 +80,7 @@ int wxPrintDialog::ShowModal() wxDC *wxPrintDialog::GetPrintDC() { - return (wxDC*) NULL; + return NULL; } // --------------------------------------------------------------------------- diff --git a/src/palmos/printpalm.cpp b/src/palmos/printpalm.cpp index 27016dd926..722ac5085d 100644 --- a/src/palmos/printpalm.cpp +++ b/src/palmos/printpalm.cpp @@ -79,7 +79,7 @@ bool wxPalmPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt) wxDC* wxPalmPrinter::PrintDialog(wxWindow *parent) { - wxDC* dc = (wxDC*) NULL; + wxDC* dc = NULL; return dc; } diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index f1af26b9da..c151dcb6cd 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -1756,8 +1756,8 @@ wxImageFileProperty::wxImageFileProperty( const wxString& label, const wxString& { SetAttribute( wxPG_FILE_WILDCARD, wxPGGetDefaultImageWildcard() ); - m_pImage = (wxImage*) NULL; - m_pBitmap = (wxBitmap*) NULL; + m_pImage = NULL; + m_pBitmap = NULL; } wxImageFileProperty::~wxImageFileProperty() diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index 69f18565a8..6184734c48 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -233,7 +233,7 @@ wxPGWindowList wxPGTextCtrlEditor::CreateControls( wxPropertyGrid* propGrid, // If has children, and limited editing is specified, then don't create. if ( (property->GetFlags() & wxPG_PROP_NOEDITOR) && property->GetChildCount() ) - return (wxWindow*) NULL; + return NULL; if ( !property->IsValueUnspecified() ) text = property->GetValueAsString(property->HasFlag(wxPG_PROP_READONLY) ? @@ -244,7 +244,7 @@ wxPGWindowList wxPGTextCtrlEditor::CreateControls( wxPropertyGrid* propGrid, property->IsKindOf(CLASSINFO(wxStringProperty)) ) flags |= wxTE_PASSWORD; - wxWindow* wnd = propGrid->GenerateEditorTextCtrl(pos,sz,text,(wxWindow*)NULL,flags, + wxWindow* wnd = propGrid->GenerateEditorTextCtrl(pos,sz,text,NULL,flags, property->GetMaxLength()); return wnd; @@ -503,7 +503,7 @@ public: wxPGComboBox() : wxOwnerDrawnComboBox() { - m_dclickProcessor = (wxPGDoubleClickProcessor*) NULL; + m_dclickProcessor = NULL; m_sizeEventCalled = false; } @@ -1051,8 +1051,8 @@ bool wxPGComboBoxEditor::OnEvent( wxPropertyGrid* propGrid, wxWindow* ctrl, wxEvent& event ) const { - wxOwnerDrawnComboBox* cb = (wxOwnerDrawnComboBox*) NULL; - wxWindow* textCtrl = (wxWindow*) NULL; + wxOwnerDrawnComboBox* cb = NULL; + wxWindow* textCtrl = NULL; if ( ctrl ) { @@ -1312,7 +1312,7 @@ wxSimpleCheckBox::~wxSimpleCheckBox() ms_doubleBuffer = NULL; } -wxBitmap* wxSimpleCheckBox::ms_doubleBuffer = (wxBitmap*) NULL; +wxBitmap* wxSimpleCheckBox::ms_doubleBuffer = NULL; void wxSimpleCheckBox::OnPaint( wxPaintEvent& WXUNUSED(event) ) { @@ -1772,7 +1772,7 @@ wxWindow* wxPropertyGrid::GenerateEditorTextCtrlAndButton( const wxPoint& pos, // There is button Show in GenerateEditorTextCtrl as well but->Show(); #endif - return (wxWindow*) NULL; + return NULL; } wxString text; diff --git a/src/propgrid/manager.cpp b/src/propgrid/manager.cpp index f7604ca745..27f4e81ac7 100644 --- a/src/propgrid/manager.cpp +++ b/src/propgrid/manager.cpp @@ -298,16 +298,16 @@ bool wxPropertyGridManager::Create( wxWindow *parent, void wxPropertyGridManager::Init1() { - //m_pPropGrid = (wxPropertyGrid*) NULL; + //m_pPropGrid = NULL; m_pPropGrid = CreatePropertyGrid(); #if wxUSE_TOOLBAR - m_pToolbar = (wxToolBar*) NULL; + m_pToolbar = NULL; #endif - m_pTxtHelpCaption = (wxStaticText*) NULL; - m_pTxtHelpContent = (wxStaticText*) NULL; + m_pTxtHelpCaption = NULL; + m_pTxtHelpContent = NULL; - m_emptyPage = (wxPropertyGridPage*) NULL; + m_emptyPage = NULL; m_selPage = -1; @@ -1263,7 +1263,7 @@ void wxPropertyGridManager::RecreateControls() // No toolbar. if ( m_pToolbar ) m_pToolbar->Destroy(); - m_pToolbar = (wxToolBar*) NULL; + m_pToolbar = NULL; } #endif @@ -1304,12 +1304,12 @@ void wxPropertyGridManager::RecreateControls() if ( m_pTxtHelpCaption ) m_pTxtHelpCaption->Destroy(); - m_pTxtHelpCaption = (wxStaticText*) NULL; + m_pTxtHelpCaption = NULL; if ( m_pTxtHelpContent ) m_pTxtHelpContent->Destroy(); - m_pTxtHelpContent = (wxStaticText*) NULL; + m_pTxtHelpContent = NULL; } int width, height; @@ -1414,7 +1414,7 @@ void wxPropertyGridManager::OnToolbarClick( wxCommandEvent &event ) { // Event dispatching must be last. - m_pPropGrid->SendEvent( wxEVT_PG_PAGE_CHANGED, (wxPGProperty*) NULL ); + m_pPropGrid->SendEvent( wxEVT_PG_PAGE_CHANGED, NULL ); } else diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index ac6d0d192c..05a46fdb0d 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -402,16 +402,16 @@ void wxPGProperty::Init() m_arrIndex = 0xFFFF; m_parent = NULL; - m_parentState = (wxPropertyGridPageState*) NULL; + m_parentState = NULL; m_clientData = NULL; m_clientObject = NULL; - m_customEditor = (wxPGEditor*) NULL; + m_customEditor = NULL; #if wxUSE_VALIDATORS - m_validator = (wxValidator*) NULL; + m_validator = NULL; #endif - m_valueBitmap = (wxBitmap*) NULL; + m_valueBitmap = NULL; m_maxLen = 0; // infinite maximum length @@ -1715,7 +1715,7 @@ void wxPGProperty::SetFlagsFromString( const wxString& str ) wxValidator* wxPGProperty::DoGetValidator() const { - return (wxValidator*) NULL; + return NULL; } int wxPGProperty::InsertChoice( const wxString& label, int index, int value ) @@ -2135,7 +2135,7 @@ wxPGProperty* wxPGProperty::GetPropertyByName( const wxString& name ) const // Does it have point, then? int pos = name.Find(wxS('.')); if ( pos <= 0 ) - return (wxPGProperty*) NULL; + return NULL; wxPGProperty* p = GetPropertyByName(name. substr(0,pos)); @@ -2404,7 +2404,7 @@ void wxPGProperty::SubPropsChanged( int oldSelInd ) child->InitAfterAdded(state, grid); } - wxPGProperty* sel = (wxPGProperty*) NULL; + wxPGProperty* sel = NULL; if ( oldSelInd >= (int)m_children.size() ) oldSelInd = (int)m_children.size() - 1; diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index ee3e8c0202..b8466f0ea6 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -154,7 +154,7 @@ public: IMPLEMENT_DYNAMIC_CLASS(wxPGGlobalVarsClassManager, wxModule) -wxPGGlobalVarsClass* wxPGGlobalVars = (wxPGGlobalVarsClass*) NULL; +wxPGGlobalVarsClass* wxPGGlobalVars = NULL; wxPGGlobalVarsClass::wxPGGlobalVarsClass() @@ -164,7 +164,7 @@ wxPGGlobalVarsClass::wxPGGlobalVarsClass() m_boolChoices.Add(_("False")); m_boolChoices.Add(_("True")); - m_fontFamilyChoices = (wxPGChoices*) NULL; + m_fontFamilyChoices = NULL; m_defaultRenderer = new wxPGDefaultRenderer(); @@ -454,13 +454,13 @@ void wxPropertyGrid::Init1() wxPropertyGrid::RegisterDefaultEditors(); m_iFlags = 0; - m_pState = (wxPropertyGridPageState*) NULL; - m_wndEditor = m_wndEditor2 = (wxWindow*) NULL; - m_selected = (wxPGProperty*) NULL; + m_pState = NULL; + m_wndEditor = m_wndEditor2 = NULL; + m_selected = NULL; m_selColumn = -1; - m_propHover = (wxPGProperty*) NULL; + m_propHover = NULL; m_eventObject = this; - m_curFocused = (wxWindow*) NULL; + m_curFocused = NULL; m_tlwHandler = NULL; m_sortFunction = NULL; m_inDoPropertyChanged = 0; @@ -488,7 +488,7 @@ void wxPropertyGrid::Init1() m_canvas = NULL; #if wxPG_DOUBLE_BUFFER - m_doubleBuffer = (wxBitmap*) NULL; + m_doubleBuffer = NULL; #endif #ifndef wxPG_ICON_WIDTH @@ -643,7 +643,7 @@ wxPropertyGrid::~wxPropertyGrid() delete m_doubleBuffer; #endif - //m_selected = (wxPGProperty*) NULL; + //m_selected = NULL; if ( m_iFlags & wxPG_FL_CREATEDSTATE ) delete m_pState; @@ -728,7 +728,7 @@ void wxPropertyGrid::SetWindowStyleFlag( long style ) // // Tooltips disabled // - m_canvas->SetToolTip( (wxToolTip*) NULL ); + m_canvas->SetToolTip( NULL ); } #endif } @@ -1404,7 +1404,7 @@ wxPGProperty* wxPropertyGrid::DoGetItemAtY( int y ) const { // Outside? if ( y < 0 ) - return (wxPGProperty*) NULL; + return NULL; unsigned int a = 0; return m_pState->m_properties->GetItemAtY(y, m_lineHeight, &a); @@ -2018,7 +2018,7 @@ wxRect wxPropertyGrid::GetPropertyRect( const wxPGProperty* p1, const wxPGProper if ( m_width < 10 || m_height < 10 || !m_pState->m_properties->GetChildCount() || - p1 == (wxPGProperty*) NULL ) + p1 == NULL ) return wxRect(0,0,0,0); int vy = 0; @@ -2249,7 +2249,7 @@ void wxPropertyGrid::SwitchState( wxPropertyGridPageState* pNewState ) pNewState->OnClientWidthChange( pgWidth, pgWidth - pNewState->m_width ); } - m_propHover = (wxPGProperty*) NULL; + m_propHover = NULL; // If necessary, convert state to correct mode. if ( orig_mode != new_state_mode ) @@ -3222,7 +3222,7 @@ void wxPropertyGrid::FreeEditors() m_wndEditor2->PopEventHandler(true); m_wndEditor2->Hide(); wxPendingDelete.Append( m_wndEditor2 ); - m_wndEditor2 = (wxWindow*) NULL; + m_wndEditor2 = NULL; } if ( m_wndEditor ) @@ -3230,7 +3230,7 @@ void wxPropertyGrid::FreeEditors() m_wndEditor->PopEventHandler(true); m_wndEditor->Hide(); wxPendingDelete.Append( m_wndEditor ); - m_wndEditor = (wxWindow*) NULL; + m_wndEditor = NULL; } } @@ -3284,7 +3284,7 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags ) FreeEditors(); // Prevent any further selection measures in this call - p = (wxPGProperty*) NULL; + p = NULL; } else { @@ -3335,8 +3335,8 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags ) FreeEditors(); m_selColumn = -1; - m_selected = (wxPGProperty*) NULL; - m_pState->m_selected = (wxPGProperty*) NULL; + m_selected = NULL; + m_pState->m_selected = NULL; // We need to always fully refresh the grid here Refresh(false); @@ -3361,7 +3361,7 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags ) if ( p != prev ) m_iFlags &= ~(wxPG_FL_VALIDATION_FAILED); - wxASSERT( m_wndEditor == (wxWindow*) NULL ); + wxASSERT( m_wndEditor == NULL ); // // Only create editor for non-disabled non-caption @@ -3560,7 +3560,7 @@ bool wxPropertyGrid::DoSelectProperty( wxPGProperty* p, unsigned int flags ) if ( !(GetExtraStyle() & wxPG_EX_HELP_AS_TOOLTIPS) ) { - wxStatusBar* statusbar = (wxStatusBar*) NULL; + wxStatusBar* statusbar = NULL; if ( !(m_iFlags & wxPG_FL_NOSTATUSBARHELP) ) { wxFrame* frame = wxDynamicCast(::wxGetTopLevelParent(this),wxFrame); @@ -3655,7 +3655,7 @@ void wxPropertyGrid::RefreshEditor() // (i.e. two-arg function calls create smaller code size). bool wxPropertyGrid::DoClearSelection() { - return DoSelectProperty((wxPGProperty*)NULL); + return DoSelectProperty(NULL); } // ----------------------------------------------------------------------- @@ -4461,7 +4461,7 @@ bool wxPropertyGrid::OnMouseCommon( wxMouseEvent& event, int* px, int* py ) wxRect r; if ( wnd ) r = wnd->GetRect(); - if ( wnd == (wxWindow*) NULL || m_dragStatus || + if ( wnd == NULL || m_dragStatus || ( ux <= (splitterX + wxPG_SPLITTERX_DETECTMARGIN2) || ux >= (r.x+r.width) || @@ -5108,7 +5108,7 @@ wxPGEditor* wxPropertyGrid::RegisterEditorClass( wxPGEditor* editorClass, // Use this in RegisterDefaultEditors. #define wxPGRegisterDefaultEditorClass(EDITOR) \ - if ( wxPGEditor_##EDITOR == (wxPGEditor*) NULL ) \ + if ( wxPGEditor_##EDITOR == NULL ) \ { \ wxPGEditor_##EDITOR = wxPropertyGrid::RegisterEditorClass( \ new wxPG##EDITOR##Editor, true ); \ diff --git a/src/propgrid/propgridpagestate.cpp b/src/propgrid/propgridpagestate.cpp index 9caa7f35cc..51959e3362 100644 --- a/src/propgrid/propgridpagestate.cpp +++ b/src/propgrid/propgridpagestate.cpp @@ -201,12 +201,12 @@ void wxPropertyGridIteratorBase::Next( bool iterateChildren ) wxPropertyGridPageState::wxPropertyGridPageState() { - m_pPropGrid = (wxPropertyGrid*) NULL; + m_pPropGrid = NULL; m_regularArray.SetParentState(this); m_properties = &m_regularArray; - m_abcArray = (wxPGRootProperty*) NULL; - m_currentCategory = (wxPropertyCategory*) NULL; - m_selected = (wxPGProperty*) NULL; + m_abcArray = NULL; + m_currentCategory = NULL; + m_selected = NULL; m_width = 0; m_virtualHeight = 0; m_lastCaptionBottomnest = 1; @@ -274,14 +274,14 @@ void wxPropertyGridPageState::DoClear() m_dictName.clear(); - m_currentCategory = (wxPropertyCategory*) NULL; + m_currentCategory = NULL; m_lastCaptionBottomnest = 1; m_itemsAdded = 0; m_virtualHeight = 0; m_vhCalcPending = 0; - m_selected = (wxPGProperty*) NULL; + m_selected = NULL; } // ----------------------------------------------------------------------- @@ -369,7 +369,7 @@ void wxPropertyGridPageState::OnClientWidthChange( int newWidth, int widthChange wxPGProperty* wxPropertyGridPageState::GetLastItem( int flags ) { if ( !m_properties->GetChildCount() ) - return (wxPGProperty*) NULL; + return NULL; wxPG_ITERATOR_CREATE_MASKS(flags, int itemExMask, int parentExMask) @@ -403,7 +403,7 @@ wxPropertyCategory* wxPropertyGridPageState::GetPropertyCategory( const wxPGProp return (wxPropertyCategory*)parent; } while ( grandparent ); - return (wxPropertyCategory*) NULL; + return NULL; } // ----------------------------------------------------------------------- @@ -443,7 +443,7 @@ wxPGProperty* wxPropertyGridPageState::BaseGetPropertyByName( const wxString& na it = m_dictName.find(name); if ( it != m_dictName.end() ) return (wxPGProperty*) it->second; - return (wxPGProperty*) NULL; + return NULL; } // ----------------------------------------------------------------------- @@ -490,7 +490,7 @@ void wxPropertyGridPageState::DoSetPropertyName( wxPGProperty* p, #define ITEM_ITERATION_INIT(startparent, startindex, state) \ parent = startparent; \ i = (unsigned int)startindex; \ - if ( parent == (wxPGProperty*) NULL ) \ + if ( parent == NULL ) \ { \ parent = state->m_properties; \ i = 0; \ @@ -720,7 +720,7 @@ wxPGProperty* wxPropertyGridPageState::DoGetItemAtY( int y ) const { // Outside? if ( y < 0 ) - return (wxPGProperty*) NULL; + return NULL; unsigned int a = 0; return m_properties->GetItemAtY(y, GetGrid()->m_lineHeight, &a); @@ -1431,7 +1431,7 @@ void wxPropertyGridPageState::DoSetPropertyValues( const wxVariantList& list, wx if ( wxStrcmp(current->GetType(), wxS("list")) == 0 ) { DoSetPropertyValues( current->GetList(), - p->IsCategory()?p:((wxPGProperty*)NULL) + p->IsCategory()?p:(NULL) ); } else @@ -1543,7 +1543,7 @@ bool wxPropertyGridPageState::PrepareToAddItem( wxPGProperty* property, // This will allow better behavior. if ( scheduledParent == m_properties ) - scheduledParent = (wxPGProperty*) NULL; + scheduledParent = NULL; if ( scheduledParent && !scheduledParent->IsCategory() ) { @@ -1621,7 +1621,7 @@ wxPGProperty* wxPropertyGridPageState::DoAppend( wxPGProperty* property ) { wxPropertyCategory* cur_cat = m_currentCategory; if ( property->IsCategory() ) - cur_cat = (wxPropertyCategory*) NULL; + cur_cat = NULL; return DoInsert( cur_cat, -1, property ); } @@ -1742,7 +1742,7 @@ void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete ) if ( item->IsCategory() ) { if ( pwc == m_currentCategory ) - m_currentCategory = (wxPropertyCategory*) NULL; + m_currentCategory = NULL; } item->DeleteChildren(); diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index 805be5a022..9014519cee 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -632,7 +632,7 @@ wxString wxFloatProperty::ValueToString( wxVariant& value, value, m_precision, !(argFlags & wxPG_FULL_VALUE), - (wxString*) NULL); + NULL); } return text; } @@ -1266,7 +1266,7 @@ void wxFlagsProperty::Init() wxFlagsProperty::wxFlagsProperty( const wxString& label, const wxString& name, const wxChar** labels, const long* values, long value ) : wxPGProperty(label,name) { - m_oldChoicesData = (wxPGChoicesData*) NULL; + m_oldChoicesData = NULL; if ( labels ) { @@ -1286,7 +1286,7 @@ wxFlagsProperty::wxFlagsProperty( const wxString& label, const wxString& name, const wxArrayString& labels, const wxArrayInt& values, int value ) : wxPGProperty(label,name) { - m_oldChoicesData = (wxPGChoicesData*) NULL; + m_oldChoicesData = NULL; if ( &labels && labels.size() ) { @@ -1306,7 +1306,7 @@ wxFlagsProperty::wxFlagsProperty( const wxString& label, const wxString& name, wxPGChoices& choices, long value ) : wxPGProperty(label,name) { - m_oldChoicesData = (wxPGChoicesData*) NULL; + m_oldChoicesData = NULL; if ( choices.IsOk() ) { @@ -2132,7 +2132,7 @@ bool wxArrayEditorDialog::Create( wxWindow *parent, // Manipulator buttons wxBoxSizer* colsizer = new wxBoxSizer( wxVERTICAL ); - m_butCustom = (wxButton*) NULL; + m_butCustom = NULL; if ( m_custBtText ) { m_butCustom = new wxButton(this,28,::wxGetTranslation(m_custBtText)); @@ -2342,7 +2342,7 @@ wxPGArrayStringEditorDialog::wxPGArrayStringEditorDialog() void wxPGArrayStringEditorDialog::Init() { - m_pCallingClass = (wxArrayStringProperty*) NULL; + m_pCallingClass = NULL; } void wxPGArrayStringEditorDialog::OnCustomEditClick(wxCommandEvent& ) diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index e9edfdd0b2..5fa710cdad 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -3173,7 +3173,7 @@ bool wxRichTextParagraph::Draw(wxDC& dc, const wxRichTextRange& range, const wxR } // Get line height from first line, if any - wxRichTextLine* line = m_cachedLines.GetFirst() ? (wxRichTextLine* ) m_cachedLines.GetFirst()->GetData() : (wxRichTextLine*) NULL; + wxRichTextLine* line = m_cachedLines.GetFirst() ? (wxRichTextLine* ) m_cachedLines.GetFirst()->GetData() : NULL; wxPoint linePos; int lineHeight wxDUMMY_INITIALIZE(0); diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index 2656c76d15..80ff466793 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -205,7 +205,7 @@ wxSize wxComboListBox::GetAdjustedSize(int minWidth, void wxComboBox::Init() { - m_lbox = (wxListBox *)NULL; + m_lbox = NULL; } wxComboBox::wxComboBox(wxWindow *parent, diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index ee60b694c5..9417dc7633 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -4314,7 +4314,7 @@ void wxTextCtrl::CreateCaret() else { // read only controls don't have the caret - caret = (wxCaret *)NULL; + caret = NULL; } // SetCaret() will delete the old caret if any @@ -4433,7 +4433,7 @@ bool wxTextCtrl::PerformAction(const wxControlAction& actionOrig, // the command this action corresponds to or NULL if this action doesn't // change text at all or can't be undone - wxTextCtrlCommand *command = (wxTextCtrlCommand *)NULL; + wxTextCtrlCommand *command = NULL; wxString action; bool del = false, @@ -4789,7 +4789,7 @@ wxInputHandler *wxTextCtrl::GetStdInputHandler(wxInputHandler *handlerDef) wxStdTextCtrlInputHandler::wxStdTextCtrlInputHandler(wxInputHandler *inphand) : wxStdInputHandler(inphand) { - m_winCapture = (wxTextCtrl *)NULL; + m_winCapture = NULL; } /* static */ @@ -4966,7 +4966,7 @@ bool wxStdTextCtrlInputHandler::HandleMouse(wxInputConsumer *consumer, m_winCapture->ShowCaret(); m_winCapture->ReleaseMouse(); - m_winCapture = (wxTextCtrl *)NULL; + m_winCapture = NULL; } } diff --git a/src/univ/theme.cpp b/src/univ/theme.cpp index 8997f255a8..47fae5820b 100644 --- a/src/univ/theme.cpp +++ b/src/univ/theme.cpp @@ -39,8 +39,8 @@ // implementation // ============================================================================ -wxThemeInfo *wxTheme::ms_allThemes = (wxThemeInfo *)NULL; -wxTheme *wxTheme::ms_theme = (wxTheme *)NULL; +wxThemeInfo *wxTheme::ms_allThemes = NULL; +wxTheme *wxTheme::ms_theme = NULL; // ---------------------------------------------------------------------------- // "dynamic" theme creation @@ -70,7 +70,7 @@ wxThemeInfo::wxThemeInfo(Constructor c, info = info->next; } - return (wxTheme *)NULL; + return NULL; } // ---------------------------------------------------------------------------- diff --git a/src/univ/winuniv.cpp b/src/univ/winuniv.cpp index c49db6611d..f623137eea 100644 --- a/src/univ/winuniv.cpp +++ b/src/univ/winuniv.cpp @@ -129,7 +129,7 @@ void wxWindow::Init() { #if wxUSE_SCROLLBAR m_scrollbarVert = - m_scrollbarHorz = (wxScrollBar *)NULL; + m_scrollbarHorz = NULL; #endif // wxUSE_SCROLLBAR m_isCurrent = false; diff --git a/src/unix/dialup.cpp b/src/unix/dialup.cpp index a46b3b9bf8..683f7b7b33 100644 --- a/src/unix/dialup.cpp +++ b/src/unix/dialup.cpp @@ -721,8 +721,8 @@ wxDialUpManagerImpl::CheckIfconfig() #if defined(__SOLARIS__) || defined (__SUNOS__) // dialup device under SunOS/Solaris - hasModem = strstr(output.fn_str(),"ipdptp") != (char *)NULL; - hasLAN = strstr(output.fn_str(), "hme") != (char *)NULL; + hasModem = strstr(output.fn_str(),"ipdptp") != NULL; + hasLAN = strstr(output.fn_str(), "hme") != NULL; #elif defined(__LINUX__) || defined (__FREEBSD__) hasModem = strstr(output.fn_str(),"ppp") // ppp || strstr(output.fn_str(),"sl") // slip diff --git a/src/unix/dir.cpp b/src/unix/dir.cpp index 291702bfa3..2581eb1cb9 100644 --- a/src/unix/dir.cpp +++ b/src/unix/dir.cpp @@ -115,7 +115,7 @@ wxDirData::~wxDirData() bool wxDirData::Read(wxString *filename) { - dirent *de = (dirent *)NULL; // just to silence compiler warnings + dirent *de = NULL; // just to silence compiler warnings bool matches = false; // speed up string concatenation in the loop a bit diff --git a/src/unix/fontutil.cpp b/src/unix/fontutil.cpp index 713510290d..38e25cea97 100644 --- a/src/unix/fontutil.cpp +++ b/src/unix/fontutil.cpp @@ -370,7 +370,7 @@ wxString wxNativeFontInfo::ToUserString() const // private data // ---------------------------------------------------------------------------- -static wxHashTable *g_fontHash = (wxHashTable*) NULL; +static wxHashTable *g_fontHash = NULL; // ---------------------------------------------------------------------------- // private functions @@ -1407,7 +1407,7 @@ void wxFontModule::OnExit() { delete g_fontHash; - g_fontHash = (wxHashTable *)NULL; + g_fontHash = NULL; } #endif // GTK 2.0/1.x diff --git a/src/unix/sound_sdl.cpp b/src/unix/sound_sdl.cpp index 512f1d987d..4b21eeac9e 100644 --- a/src/unix/sound_sdl.cpp +++ b/src/unix/sound_sdl.cpp @@ -53,7 +53,7 @@ wxDECLARE_LOCAL_EVENT( wxEVT_SOUND_BACKEND_SDL_NOTIFICATION, wxSoundBackendSDLNo -1, \ -1, \ wxEVENT_HANDLER_CAST( wxSoundBackendSDLNotificationFunction, func ), \ - (wxObject *) NULL ), + NULL ), IMPLEMENT_DYNAMIC_CLASS(wxSoundBackendSDLNotification, wxEvtHandler) wxDEFINE_EVENT( wxEVT_SOUND_BACKEND_SDL_NOTIFICATION, wxSoundBackendSDLNotification ) diff --git a/src/unix/threadpsx.cpp b/src/unix/threadpsx.cpp index 692be7d169..29f127c1b9 100644 --- a/src/unix/threadpsx.cpp +++ b/src/unix/threadpsx.cpp @@ -128,11 +128,11 @@ static pthread_key_t gs_keySelf; static size_t gs_nThreadsBeingDeleted = 0; // a mutex to protect gs_nThreadsBeingDeleted -static wxMutex *gs_mutexDeleteThread = (wxMutex *)NULL; +static wxMutex *gs_mutexDeleteThread = NULL; // and a condition variable which will be signaled when all // gs_nThreadsBeingDeleted will have been deleted -static wxCondition *gs_condAllDeleted = (wxCondition *)NULL; +static wxCondition *gs_condAllDeleted = NULL; // this mutex must be acquired before any call to a GUI function // (it's not inside #if wxUSE_GUI because this file is compiled as part diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index a5c3221bb2..d7036f000b 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -202,7 +202,7 @@ void wxMicroSleep(unsigned long microseconds) tmReq.tv_nsec = (microseconds % 1000000) * 1000; // we're not interested in remaining time nor in return value - (void)nanosleep(&tmReq, (timespec *)NULL); + (void)nanosleep(&tmReq, NULL); #elif defined(HAVE_USLEEP) // uncomment this if you feel brave or if you are sure that your version // of Solaris has a safe usleep() function but please notice that usleep() diff --git a/src/x11/bitmap.cpp b/src/x11/bitmap.cpp index ea19aee7a3..be6e240a15 100644 --- a/src/x11/bitmap.cpp +++ b/src/x11/bitmap.cpp @@ -258,7 +258,7 @@ wxBitmapRefData::wxBitmapRefData() m_width = 0; m_height = 0; m_bpp = 0; - m_palette = (wxPalette *) NULL; + m_palette = NULL; } wxBitmapRefData::wxBitmapRefData(const wxBitmapRefData& data) @@ -598,7 +598,7 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth ) // Create mask if necessary const bool hasMask = image.HasMask(); - XImage *mask_image = (XImage*) NULL; + XImage *mask_image = NULL; if ( hasMask ) { mask_image = XCreateImage( xdisplay, xvisual, 1, ZPixmap, 0, 0, width, height, 32, 0 ); @@ -959,7 +959,7 @@ int wxBitmap::GetDepth() const wxMask *wxBitmap::GetMask() const { - wxCHECK_MSG( Ok(), (wxMask *) NULL, wxT("invalid bitmap") ); + wxCHECK_MSG( Ok(), NULL, wxT("invalid bitmap") ); return M_BMPDATA->m_mask; } @@ -1086,7 +1086,7 @@ void wxBitmap::SetPalette(const wxPalette& palette) wxPalette *wxBitmap::GetPalette() const { - if (!Ok()) return (wxPalette *) NULL; + if (!Ok()) return NULL; return M_BMPDATA->m_palette; } @@ -1150,7 +1150,7 @@ WXPixmap wxBitmap::GetDrawable() const WXDisplay *wxBitmap::GetDisplay() const { - wxCHECK_MSG( Ok(), (WXDisplay*) NULL, wxT("invalid bitmap") ); + wxCHECK_MSG( Ok(), NULL, wxT("invalid bitmap") ); return M_BMPDATA->m_display; } @@ -1565,7 +1565,7 @@ bool wxXBMDataHandler::Create( wxBitmap *bitmap, const void* bits, int xscreen = DefaultScreen( xdisplay ); Window xroot = RootWindow( xdisplay, xscreen ); - M_BMPHANDLERDATA->m_mask = (wxMask *) NULL; + M_BMPHANDLERDATA->m_mask = NULL; M_BMPHANDLERDATA->m_bitmap = XCreateBitmapFromData(xdisplay, xroot, (char *) bits, width, height ); diff --git a/src/x11/clipbrd.cpp b/src/x11/clipbrd.cpp index a523296de8..f5747e507d 100644 --- a/src/x11/clipbrd.cpp +++ b/src/x11/clipbrd.cpp @@ -216,7 +216,7 @@ selection_clear_clip( GtkWidget *WXUNUSED(widget), GdkEventSelection *event ) wxLogTrace(TRACE_CLIPBOARD, wxT("wxClipboard will get cleared" )); delete wxTheClipboard->m_data; - wxTheClipboard->m_data = (wxDataObject*) NULL; + wxTheClipboard->m_data = NULL; } } @@ -293,8 +293,8 @@ wxClipboard::wxClipboard() m_ownsClipboard = false; m_ownsPrimarySelection = false; - m_data = (wxDataObject*) NULL; - m_receivedData = (wxDataObject*) NULL; + m_data = NULL; + m_receivedData = NULL; /* we use m_targetsWidget to query what formats are available */ @@ -331,7 +331,7 @@ void wxClipboard::Clear() { m_waiting = true; - gtk_selection_owner_set( (GtkWidget*) NULL, g_clipboardAtom, + gtk_selection_owner_set( NULL, g_clipboardAtom, (guint32) GDK_CURRENT_TIME ); while (m_waiting) gtk_main_iteration(); @@ -341,7 +341,7 @@ void wxClipboard::Clear() { m_waiting = true; - gtk_selection_owner_set( (GtkWidget*) NULL, GDK_SELECTION_PRIMARY, + gtk_selection_owner_set( NULL, GDK_SELECTION_PRIMARY, (guint32) GDK_CURRENT_TIME ); while (m_waiting) gtk_main_iteration(); @@ -351,7 +351,7 @@ void wxClipboard::Clear() if (m_data) { delete m_data; - m_data = (wxDataObject*) NULL; + m_data = NULL; } #if wxUSE_THREADS diff --git a/src/x11/colour.cpp b/src/x11/colour.cpp index df120d904b..53ceebfce9 100644 --- a/src/x11/colour.cpp +++ b/src/x11/colour.cpp @@ -34,7 +34,7 @@ public: m_color.green = 0; m_color.blue = 0; m_color.pixel = 0; - m_colormap = (WXColormap *) NULL; + m_colormap = NULL; m_hasPixel = false; } @@ -240,7 +240,7 @@ unsigned long wxColour::GetPixel() const WXColor *wxColour::GetColor() const { - wxCHECK_MSG( Ok(), (WXColor *) NULL, wxT("invalid colour") ); + wxCHECK_MSG( Ok(), NULL, wxT("invalid colour") ); return (WXColor*) &M_COLDATA->m_color; } diff --git a/src/x11/dcclient.cpp b/src/x11/dcclient.cpp index 68164906c9..8f61035cf9 100644 --- a/src/x11/dcclient.cpp +++ b/src/x11/dcclient.cpp @@ -62,7 +62,7 @@ #define IS_16_PIX_HATCH(s) ((s)!=wxCROSSDIAG_HATCH && (s)!=wxHORIZONTAL_HATCH && (s)!=wxVERTICAL_HATCH) static Pixmap hatches[num_hatches]; -static Pixmap *hatch_bitmap = (Pixmap *) NULL; +static Pixmap *hatch_bitmap = NULL; //----------------------------------------------------------------------------- // constants @@ -222,19 +222,19 @@ wxWindowDCImpl::~wxWindowDCImpl() void wxWindowDCImpl::Init() { - m_display = (WXDisplay *) NULL; - m_penGC = (WXGC *) NULL; - m_brushGC = (WXGC *) NULL; - m_textGC = (WXGC *) NULL; - m_bgGC = (WXGC *) NULL; - m_cmap = (WXColormap *) NULL; + m_display = NULL; + m_penGC = NULL; + m_brushGC = NULL; + m_textGC = NULL; + m_bgGC = NULL; + m_cmap = NULL; m_isMemDC = false; m_isScreenDC = false; - m_x11window = (WXWindow*) NULL; + m_x11window = NULL; #if wxUSE_UNICODE m_context = wxTheApp->GetPangoContext(); - m_fontdesc = (PangoFontDescription *)NULL; + m_fontdesc = NULL; #endif } @@ -1913,7 +1913,7 @@ void wxWindowDCImpl::SetPen( const wxPen &pen ) default: { lineStyle = LineSolid; - req_dash = (wxX11Dash*)NULL; + req_dash = NULL; req_nb_dash = 0; break; } diff --git a/src/x11/dnd.cpp b/src/x11/dnd.cpp index ce9aa24bbf..d555b2ef61 100644 --- a/src/x11/dnd.cpp +++ b/src/x11/dnd.cpp @@ -133,7 +133,7 @@ wxDropSource::wxDropSource( wxWindow *win ) { #if 0 m_window = win; - m_data = (wxDataObject *) NULL; + m_data = NULL; m_retValue = wxDragCancel; m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY ); diff --git a/src/x11/font.cpp b/src/x11/font.cpp index e29187f742..7e3ec5f6dc 100644 --- a/src/x11/font.cpp +++ b/src/x11/font.cpp @@ -777,7 +777,7 @@ bool wxFont::GetNoAntiAliasing() const const wxNativeFontInfo *wxFont::GetNativeFontInfo() const { - wxCHECK_MSG( Ok(), (wxNativeFontInfo *)NULL, wxT("invalid font") ); + wxCHECK_MSG( Ok(), NULL, wxT("invalid font") ); #if wxUSE_UNICODE #else @@ -892,7 +892,7 @@ void wxFont::SetNoAntiAliasing( bool no ) wxXFont* wxFont::GetInternalFont(double scale, WXDisplay* display) const { if ( !Ok() ) - return (wxXFont *)NULL; + return NULL; long intScale = long(scale * 100.0 + 0.5); // key for wxXFont int pointSize = (M_FONTDATA->m_pointSize * 10 * intScale) / 100; @@ -927,7 +927,7 @@ wxXFont* wxFont::GetInternalFont(double scale, WXDisplay* display) const { wxFAIL_MSG( wxT("Could not allocate even a default font -- something is wrong.") ); - return (wxXFont*) NULL; + return NULL; } wxXFont* f = new wxXFont; diff --git a/src/x11/palette.cpp b/src/x11/palette.cpp index 8062102b74..82c455bd80 100644 --- a/src/x11/palette.cpp +++ b/src/x11/palette.cpp @@ -77,7 +77,7 @@ wxPaletteRefData::wxPaletteRefData() wxPaletteRefData::~wxPaletteRefData() { - Display *display = (Display*) NULL; + Display *display = NULL; wxList::compatibility_iterator node, next; diff --git a/src/x11/pen.cpp b/src/x11/pen.cpp index 4e8be7e168..7142bed347 100644 --- a/src/x11/pen.cpp +++ b/src/x11/pen.cpp @@ -33,7 +33,7 @@ public: m_style = wxPENSTYLE_SOLID; m_joinStyle = wxJOIN_ROUND; m_capStyle = wxCAP_ROUND; - m_dash = (wxX11Dash*) NULL; + m_dash = NULL; m_countDashes = 0; } diff --git a/src/x11/region.cpp b/src/x11/region.cpp index 685289870b..74477235de 100644 --- a/src/x11/region.cpp +++ b/src/x11/region.cpp @@ -337,7 +337,7 @@ wxRegionContain wxRegion::DoContainsRect(const wxRect& r) const WXRegion *wxRegion::GetX11Region() const { if (!m_refData) - return (WXRegion*) NULL; + return NULL; return (WXRegion*) M_REGIONDATA->m_region; } -- 2.45.2