simplify (no need to cache a vector/array GetSize())
This commit is contained in:
@@ -50,10 +50,9 @@ void MusicList::AddSongsToGroup(const CArray<Song*,Song*> &Songs)
|
||||
if( iIndex >= Songs.GetSize() )
|
||||
continue;
|
||||
|
||||
int iSongsLen = Songs.GetSize();
|
||||
if( (c == TITLES_COLUMNS-1) && (r == TITLES_ROWS-1) && (iSongsLen != TITLES_COLUMNS*TITLES_ROWS) )
|
||||
if( c == TITLES_COLUMNS-1 && r == TITLES_ROWS-1 && Songs.GetSize() != TITLES_COLUMNS*TITLES_ROWS )
|
||||
{
|
||||
sText += ssprintf( "%d more.....", iSongsLen - TITLES_COLUMNS * TITLES_ROWS + 1 );
|
||||
sText += ssprintf( "%d more.....", Songs.GetSize() - TITLES_COLUMNS * TITLES_ROWS + 1 );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user