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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user