Avoid bug in VS 2015 code generation

When using Whole Program Optimization, pItem->OnDrawItem() incorrectly calls the
base class wxOwnerDrawn::OnDrawItem() instead of the appropriate override, for
example wxCheckListBoxItem::OnDrawItem(). The problem can be avoided by not
using an unnecessary cast to wxListBoxItem*.
This commit is contained in:
Paul Cornett
2015-09-09 22:38:42 -07:00
parent ba851346b5
commit 5905857dba

View File

@@ -777,7 +777,7 @@ bool wxListBox::MSWOnDraw(WXDRAWITEMSTRUCT *item)
if ( pStruct->itemID == (UINT)-1 )
return false;
wxListBoxItem *pItem = (wxListBoxItem *)m_aItems[pStruct->itemID];
wxOwnerDrawn *pItem = m_aItems[pStruct->itemID];
wxDCTemp dc((WXHDC)pStruct->hDC);