From c88f3a114cd4d10032a190dfa992a7ec578c945f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 3 May 2020 03:02:20 +0200 Subject: [PATCH] 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 --- src/msw/listbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index f8b0d19a95..ccb65b8e32 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -617,7 +617,7 @@ void wxListBox::SetHorizontalExtent(const wxString& s) bool wxListBox::MSWSetTabStops(const wxVector& tabStops) { return SendMessage(GetHwnd(), LB_SETTABSTOPS, (WPARAM)tabStops.size(), - tabStops.size() ? (LPARAM)tabStops.begin() : NULL); + tabStops.size() ? (LPARAM)&tabStops[0] : 0); } wxSize wxListBox::DoGetBestClientSize() const