diff --git a/docs/doxygen/overviews/refcount.h b/docs/doxygen/overviews/refcount.h index 433b56e298..bfa2dd9a27 100644 --- a/docs/doxygen/overviews/refcount.h +++ b/docs/doxygen/overviews/refcount.h @@ -108,7 +108,7 @@ class-specific shared data. For example: @code MyClassRefData* GetData() const { - return wx_static_cast(MyClassRefData*, m_refData); + return static_cast(m_refData); } @endcode diff --git a/include/wx/defs.h b/include/wx/defs.h index 84793c02b9..fe5fdb48f7 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -337,7 +337,7 @@ typedef short int WXTYPE; #endif /* for consistency with wxStatic/DynamicCast defined in wx/object.h */ -#define wxConstCast(obj, className) wx_const_cast(className *, obj) +#define wxConstCast(obj, className) const_cast(obj) #ifndef HAVE_STD_WSTRING #if __cplusplus >= 201103L @@ -1284,7 +1284,7 @@ inline wxUIntPtr wxPtrToUInt(const void *p) #pragma warning(disable: 1684) #endif - return wx_reinterpret_cast(wxUIntPtr, p); + return reinterpret_cast(p); #if defined(__VISUALC__) || defined(__INTELC__) #pragma warning(pop) @@ -1303,7 +1303,7 @@ inline void *wxUIntToPtr(wxUIntPtr p) #pragma warning(disable: 171) #endif - return wx_reinterpret_cast(void *, p); + return reinterpret_cast(p); #if defined(__VISUALC__) || defined(__INTELC__) #pragma warning(pop) diff --git a/include/wx/dlist.h b/include/wx/dlist.h index e0d23106e0..d25428de29 100644 --- a/include/wx/dlist.h +++ b/include/wx/dlist.h @@ -238,7 +238,7 @@ public: Node *GetNext() const { return m_next; } Node *GetPrevious() const { return m_previous; } T *GetData() const { return m_data; } - T **GetDataPtr() const { return &(wx_const_cast(nodetype*,this)->m_data); } + T **GetDataPtr() const { return &(const_cast(this)->m_data); } void SetData( T *data ) { m_data = data; } int IndexOf() const diff --git a/interface/wx/object.h b/interface/wx/object.h index 9baa53eb3f..b118edb38c 100644 --- a/interface/wx/object.h +++ b/interface/wx/object.h @@ -789,39 +789,6 @@ public: */ #define wxIMPLEMENT_CLASS2( className, baseClassName1, baseClassName2 ) -/** - Same as @c const_cast(x) if the compiler supports const cast or @c (T)x for - old compilers. Unlike wxConstCast(), the cast it to the type @c T and not to - T * and also the order of arguments is the same as for the standard cast. - - @header{wx/defs.h} - - @see wx_reinterpret_cast(), wx_static_cast() -*/ -#define wx_const_cast(T, x) - -/** - Same as @c reinterpret_cast(x) if the compiler supports reinterpret cast or - @c (T)x for old compilers. - - @header{wx/defs.h} - - @see wx_const_cast(), wx_static_cast() -*/ -#define wx_reinterpret_cast(T, x) - -/** - Same as @c static_cast(x) if the compiler supports static cast or @c (T)x for - old compilers. Unlike wxStaticCast(), there are no checks being done and - the meaning of the macro arguments is exactly the same as for the standard - static cast, i.e. @a T is the full type name and star is not appended to it. - - @header{wx/defs.h} - - @see wx_const_cast(), wx_reinterpret_cast(), wx_truncate_cast() -*/ -#define wx_static_cast(T, x) - /** This case doesn’t correspond to any standard cast but exists solely to make casts which possibly result in a truncation of an integer value more @@ -837,7 +804,7 @@ public: @header{wx/defs.h} - @see wx_const_cast(), wxDynamicCast(), wxStaticCast() + @see wxDynamicCast(), wxStaticCast() */ #define wxConstCast( ptr, classname ) @@ -889,7 +856,7 @@ public: @header{wx/object.h} - @see wx_static_cast(), wxDynamicCast(), wxConstCast() + @see wxDynamicCast(), wxConstCast() */ #define wxStaticCast( ptr, classname ) diff --git a/interface/wx/pickerbase.h b/interface/wx/pickerbase.h index 160cfaa04e..b50a964225 100644 --- a/interface/wx/pickerbase.h +++ b/interface/wx/pickerbase.h @@ -89,7 +89,7 @@ public: // wxMSW is one of the platforms where the generic implementation // of wxFilePickerCtrl is used... - wxButton *pButt = wx_static_cast(wxButton*, myFilePickerCtrl->GetPickerCtrl()); + wxButton *pButt = static_cast(myFilePickerCtrl->GetPickerCtrl()); if (pButt) pButt->SetLabel("Custom browse string"); #endif diff --git a/samples/xti/classlist.cpp b/samples/xti/classlist.cpp index 5cc8f5dc78..4b9ac66d74 100644 --- a/samples/xti/classlist.cpp +++ b/samples/xti/classlist.cpp @@ -262,7 +262,7 @@ void ClassListDialog::InitControls() bool ClassListDialog::IsToDiscard(const wxString &classname) const { - wxCheckBox *cb = wx_static_cast(wxCheckBox*, FindWindow(ID_SHOW_ONLY_XTI)); + wxCheckBox *cb = static_cast(FindWindow(ID_SHOW_ONLY_XTI)); if (!cb || !cb->IsChecked()) return false; @@ -288,7 +288,7 @@ void ClassListDialog::UpdateFilterText() void ClassListDialog::UpdateClassInfo(const wxString &itemName) { wxString classname = itemName.BeforeFirst(wxT(' ')); - wxCheckBox *cb = wx_static_cast(wxCheckBox*, FindWindow(ID_SHOW_PROPERTIES_RECURSIVELY)); + wxCheckBox *cb = static_cast(FindWindow(ID_SHOW_PROPERTIES_RECURSIVELY)); m_pTextCtrl->SetValue( DumpClassInfo(wxClassInfo::FindClass(classname), cb->IsChecked())); diff --git a/src/unix/glx11.cpp b/src/unix/glx11.cpp index 65346010c4..d409d6d578 100644 --- a/src/unix/glx11.cpp +++ b/src/unix/glx11.cpp @@ -671,7 +671,7 @@ bool wxGLCanvasX11::InitXVisualInfo(const wxGLAttributes& dispAttrs, { *pFBC = NULL; *pXVisual = glXChooseVisual(dpy, DefaultScreen(dpy), - wx_const_cast(int*, attrsListGLX) ); + const_cast(attrsListGLX) ); } return *pXVisual != NULL;