Reverse loop to eliminate checking count each iteration
This commit is contained in:
@@ -840,7 +840,7 @@ TBarApp::RemoveTeam(team_id team)
|
|||||||
void
|
void
|
||||||
TBarApp::ResizeTeamIcons()
|
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);
|
BarTeamInfo* barInfo = (BarTeamInfo*)sBarTeamInfoList.ItemAt(i);
|
||||||
if ((barInfo->flags & B_BACKGROUND_APP) == 0
|
if ((barInfo->flags & B_BACKGROUND_APP) == 0
|
||||||
&& strcasecmp(barInfo->sig, kDeskbarSignature) != 0) {
|
&& strcasecmp(barInfo->sig, kDeskbarSignature) != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user