From 95b5fcc0eafe94be33cc03cec3e66c6ffd2da9de Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Sun, 12 Jul 2020 20:07:29 +0200 Subject: [PATCH] Use empty() function to check if vector is empty Use this dedicated function instead of checking if size() function returns zero/non-zero value. --- 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 b6a63c4318..4ccef0529f 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[0] : 0) == TRUE; + tabStops.empty() ? NULL : (LPARAM)&tabStops[0]) == TRUE; } wxSize wxListBox::DoGetBestClientSize() const