From a8869f2afe190cb50c7de59428b2b998acb2c4b9 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 11 Oct 2002 20:49:50 +0000 Subject: [PATCH] simplify (no need to cache a vector/array GetSize()) --- stepmania/src/MusicList.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stepmania/src/MusicList.cpp b/stepmania/src/MusicList.cpp index 5e6b703b32..2faf5fbd9d 100644 --- a/stepmania/src/MusicList.cpp +++ b/stepmania/src/MusicList.cpp @@ -50,10 +50,9 @@ void MusicList::AddSongsToGroup(const CArray &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; }