Improve ScreenEdit compile times in g++ 3.3.

This commit is contained in:
Glenn Maynard
2003-11-08 00:50:25 +00:00
parent bdb280256e
commit d5e98040b2
5 changed files with 153 additions and 144 deletions
+22 -1
View File
@@ -67,7 +67,7 @@ ScreenMiniMenu::ScreenMiniMenu( Menu* pDef, ScreenMessage SM_SendOnOK, ScreenMes
for( unsigned i=0; i<m_Def.rows.size(); i++ )
{
MenuRow& line = m_Def.rows[i];
MenuRowInternal& line = m_Def.rows[i];
m_iCurAnswers[i] = 0;
float fY = SCALE( i, 0.f, m_Def.rows.size()-1.f, CENTER_Y-fHeightOfAll/2, CENTER_Y+fHeightOfAll/2 );
@@ -296,3 +296,24 @@ bool ScreenMiniMenu::CanGoRight()
else
return m_iCurAnswers[m_iCurLine] != iNumInCurRow-1;
}
Menu::Menu( CString t, const MenuRow *rowp )
{
title = t;
for( int i = 0; rowp[i].name; ++i )
rows.push_back( rowp[i] );
}
MenuRowInternal::MenuRowInternal( const MenuRow &r )
{
name = r.name;
enabled = r.enabled;
defaultChoice = r.defaultChoice;
#define PUSH( c ) if(c!=NULL) choices.push_back(c);
for( unsigned i = 0; i < ARRAYSIZE(r.choices); ++i )
PUSH( r.choices[i] );
#undef PUSH
}