Previously, OptionRowHandler was owned and freed by
ScreenOptionsMaster (and ScreenOptionsManageProfiles). Make it owned by OptionRow; the only pointer to them is where they're stored in the OptionRow. This eliminates the remaining association between m_OptionRowHandlers and m_pRows; that was confusing, because they're in different places, and aren't always the same size. It also simplifies using OptionRowHandlers.
This commit is contained in:
@@ -103,21 +103,16 @@ void OptionRow::Clear()
|
||||
FOREACH_PlayerNumber( p )
|
||||
m_Underline[p].clear();
|
||||
|
||||
ASSERT( m_pHand == NULL );
|
||||
|
||||
m_bFirstItemGoesDown = false;
|
||||
ZERO( m_bRowHasFocus );
|
||||
ZERO( m_iChoiceInRowWithFocus );
|
||||
}
|
||||
|
||||
void OptionRow::DetachHandler()
|
||||
{
|
||||
if( m_pHand )
|
||||
{
|
||||
FOREACH_CONST( CString, m_pHand->m_vsReloadRowMessages, m )
|
||||
MESSAGEMAN->Unsubscribe( this, *m );
|
||||
}
|
||||
m_pHand = NULL;
|
||||
SAFE_DELETE( m_pHand );
|
||||
|
||||
m_bFirstItemGoesDown = false;
|
||||
ZERO( m_bRowHasFocus );
|
||||
ZERO( m_iChoiceInRowWithFocus );
|
||||
}
|
||||
|
||||
void OptionRowType::Load( const CString &sType )
|
||||
|
||||
Reference in New Issue
Block a user