Reverse loop to eliminate checking count each iteration

This commit is contained in:
John Scipione
2013-04-14 02:49:34 -04:00
parent 9439677a9c
commit 5d6f247bb3
+1 -1
View File
@@ -840,7 +840,7 @@ TBarApp::RemoveTeam(team_id team)
void
TBarApp::ResizeTeamIcons()
{
for (int32 i = 0; i < sBarTeamInfoList.CountItems(); i++) {
for (int32 i = sBarTeamInfoList.CountItems() - 1; i >= 0; i--) {
BarTeamInfo* barInfo = (BarTeamInfo*)sBarTeamInfoList.ItemAt(i);
if ((barInfo->flags & B_BACKGROUND_APP) == 0
&& strcasecmp(barInfo->sig, kDeskbarSignature) != 0) {