Eliminate a couple more -Wcast-qual warnings

This commit is contained in:
Paul Cornett 2020-02-03 09:02:14 -08:00
parent ad7dfba124
commit f4299c3c01
3 changed files with 3 additions and 3 deletions

View File

@ -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;
};

View File

@ -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);

View File

@ -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);