Fix warnings in recently added MSWSetTabStops()

gcc complained about converting NULL to long (-Wconversion-null), so use
0 explicitly. Also really pass the pointer to the first element, rather
than iterator, which is not guaranteed to be a pointer.

This amends the changes of d1553c63ed (Improve support for TABs in
wxListBox under MSW, 2020-04-13).

See https://github.com/wxWidgets/wxWidgets/pull/1789
This commit is contained in:
Vadim Zeitlin
2020-05-03 03:02:20 +02:00
parent 43bdadda0d
commit c88f3a114c

View File

@@ -617,7 +617,7 @@ void wxListBox::SetHorizontalExtent(const wxString& s)
bool wxListBox::MSWSetTabStops(const wxVector<int>& tabStops) bool wxListBox::MSWSetTabStops(const wxVector<int>& tabStops)
{ {
return SendMessage(GetHwnd(), LB_SETTABSTOPS, (WPARAM)tabStops.size(), return SendMessage(GetHwnd(), LB_SETTABSTOPS, (WPARAM)tabStops.size(),
tabStops.size() ? (LPARAM)tabStops.begin() : NULL); tabStops.size() ? (LPARAM)&tabStops[0] : 0);
} }
wxSize wxListBox::DoGetBestClientSize() const wxSize wxListBox::DoGetBestClientSize() const