diff --git a/include/wx/list.h b/include/wx/list.h index 40f5b79341..ee55b58e9c 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -71,7 +71,7 @@ class wxList_SortFunction public: wxList_SortFunction(wxSortCompareFunction f) : m_f(f) { } bool operator()(const T& i1, const T& i2) - { return m_f((T*)&i1, (T*)&i2) < 0; } + { return m_f(&i1, &i2) < 0; } private: wxSortCompareFunction m_f; }; diff --git a/src/stc/gen_iface.py b/src/stc/gen_iface.py index 04ff317485..6e976fded1 100755 --- a/src/stc/gen_iface.py +++ b/src/stc/gen_iface.py @@ -552,7 +552,7 @@ methodOverrideMap = { ft.chrg.cpMin = minPos; ft.chrg.cpMax = maxPos; const wxWX2MBbuf buf = wx2stc(text); - ft.lpstrText = (char*)(const char*)buf; + ft.lpstrText = buf; int pos = SendMsg(%s, flags, (sptr_t)&ft); if (findEnd) *findEnd=(pos==-1?wxSTC_INVALID_POSITION:ft.chrgText.cpMax); diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index df2bd96efb..561379d7d3 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -1702,7 +1702,7 @@ int wxStyledTextCtrl::FindText(int minPos, int maxPos, const wxString& text, ft.chrg.cpMin = minPos; ft.chrg.cpMax = maxPos; const wxWX2MBbuf buf = wx2stc(text); - ft.lpstrText = (char*)(const char*)buf; + ft.lpstrText = buf; int pos = SendMsg(SCI_FINDTEXT, flags, (sptr_t)&ft); if (findEnd) *findEnd=(pos==-1?wxSTC_INVALID_POSITION:ft.chrgText.cpMax);