From 71fdad5f6df0b9130e38de415a1546eea6b44287 Mon Sep 17 00:00:00 2001 From: New Pagodi Date: Fri, 26 Jun 2020 14:06:32 -0500 Subject: [PATCH] Prevent warning in wxSTCListBoxWin ctr Currently 1 argument for the constructor is only used in an #ifdef block, and so some compilers give an unused parameter warning. Instead use the parameter with a switch statement to avoid the warning. --- src/stc/PlatWX.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 40b78b5102..34f6356279 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -3223,15 +3223,17 @@ wxSTCListBoxWin::wxSTCListBoxWin(wxWindow* parent, wxSTCListBox** lb, wxSTCListBoxVisualData* v, int h, int tech) :wxSTCPopupWindow(parent) { + switch ( tech ) + { #ifdef HAVE_DIRECTWRITE_TECHNOLOGY - if ( tech == wxSTC_TECHNOLOGY_DIRECTWRITE ) - { - *lb = new wxSTCListBoxD2D(this, v, h); - } - else + case wxSTC_TECHNOLOGY_DIRECTWRITE: + *lb = new wxSTCListBoxD2D(this, v, h); + break; #endif - { - *lb = new wxSTCListBox(this, v, h); + case wxSTC_TECHNOLOGY_DEFAULT: + wxFALLTHROUGH; + default: + *lb = new wxSTCListBox(this, v, h); } // Use the background of this window to form a frame around the listbox