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:
Glenn Maynard
2006-01-16 22:55:57 +00:00
parent 3f60d2e26a
commit 3c63e09ca3
7 changed files with 14 additions and 39 deletions
+5 -10
View File
@@ -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 )