fix signed/unsigned comparisons. Unless I'm mistaken, size() returns a size_t which is an unsigned int.

This commit is contained in:
Steve Checkoway
2004-01-10 07:30:08 +00:00
parent 51ee73d0a1
commit 4f62f34ad9
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -189,7 +189,7 @@ void ScreenOptions::Init( InputMode im, OptionRowData OptionRows[], int iNumOpti
// init m_textItems from optionLines // init m_textItems from optionLines
{ {
for( int r=0; r<m_Rows.size(); r++ ) // foreach row for( unsigned r=0; r<m_Rows.size(); r++ ) // foreach row
{ {
Row &row = *m_Rows[r]; Row &row = *m_Rows[r];
row.Type = Row::ROW_NORMAL; row.Type = Row::ROW_NORMAL;
@@ -300,10 +300,10 @@ void ScreenOptions::Init( InputMode im, OptionRowData OptionRows[], int iNumOpti
// Add children here and not above because of the logic that starts // Add children here and not above because of the logic that starts
// over if we run off the right edge of the screen. // over if we run off the right edge of the screen.
{ {
for( int c=0; c<textItems.size(); c++ ) for( unsigned c=0; c<textItems.size(); c++ )
m_framePage.AddChild( textItems[c] ); m_framePage.AddChild( textItems[c] );
for( int p=0; p<NUM_PLAYERS; p++ ) for( int p=0; p<NUM_PLAYERS; p++ )
for( int c=0; c<row.m_Underline[p].size(); c++ ) for( unsigned c=0; c<row.m_Underline[p].size(); c++ )
m_framePage.AddChild( row.m_Underline[p][c] ); m_framePage.AddChild( row.m_Underline[p][c] );
} }
} }
@@ -590,7 +590,7 @@ void ScreenOptions::PositionUnderlines()
} }
else // !row.m_bRowIsLong else // !row.m_bRowIsLong
{ {
for( int i=0; i<vpUnderlines.size(); i++ ) for( unsigned i=0; i<vpUnderlines.size(); i++ )
{ {
OptionsCursor& ul = *vpUnderlines[i]; OptionsCursor& ul = *vpUnderlines[i];
+1 -1
View File
@@ -576,7 +576,7 @@ void ScreenOptionsMaster::RefreshIcons()
if( !GAMESTATE->IsHumanPlayer(p) ) if( !GAMESTATE->IsHumanPlayer(p) )
continue; continue;
for( int i=0; i<m_Rows.size(); i++ ) // foreach options line for( unsigned i=0; i<m_Rows.size(); ++i ) // foreach options line
{ {
if( m_Rows[i]->Type == Row::ROW_EXIT ) if( m_Rows[i]->Type == Row::ROW_EXIT )
continue; // skip continue; // skip