WaE: possible use of unitialized variable

This commit is contained in:
David Tardon
2011-03-28 14:20:19 +02:00
parent d6fc9301e6
commit 51a3b004bb

View File

@@ -1098,16 +1098,21 @@ namespace svt
::boost::optional< size_t > aNewItem( m_pImpl->FindItemForPoint( i_rMouseEvent.GetPosPixel() ) );
if ( i_rMouseEvent.IsLeaveWindow() )
aNewItem.reset();
aNewItem = ::boost::optional< size_t >();
if ( aOldItem != aNewItem )
bool const bChanged(
( !aOldItem && aNewItem )
|| ( aOldItem && !aNewItem )
|| ( aOldItem && aNewItem && aOldItem != aNewItem ) )
;
if ( bChanged )
{
if ( !!aOldItem )
if ( aOldItem )
m_pImpl->InvalidateItem( *aOldItem );
m_pImpl->m_aHoveredItem = aNewItem;
if ( !!aNewItem )
if ( aNewItem )
m_pImpl->InvalidateItem( *aNewItem );
}
}