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.
This commit is contained in:
New Pagodi 2020-06-26 14:06:32 -05:00
parent 01b3bf7eef
commit 71fdad5f6d

View File

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