From 626fd4788680b6c7d25ef59c7da17fc839bd9789 Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Wed, 19 Dec 2012 20:08:23 +0100 Subject: [PATCH] just a (very) small performance enhancement --- PartyModeChallenge/PartyScreenChallengeNames.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/PartyModeChallenge/PartyScreenChallengeNames.cs b/PartyModeChallenge/PartyScreenChallengeNames.cs index 21136ae7..6603f766 100644 --- a/PartyModeChallenge/PartyScreenChallengeNames.cs +++ b/PartyModeChallenge/PartyScreenChallengeNames.cs @@ -399,13 +399,15 @@ namespace Vocaluxe.PartyModes if (_Base.Profiles.GetProfiles()[i].Active == EOffOn.TR_CONFIG_ON) { visible = true; - } - for (int p = 0; p < Data.ScreenNames.ProfileIDs.Count; p++) - { - //Don't show profile if is selected, but if selected and guest - if (Data.ScreenNames.ProfileIDs[p] == i && _Base.Profiles.GetProfiles()[i].GuestProfile == EOffOn.TR_CONFIG_OFF) + + for (int p = 0; p < Data.ScreenNames.ProfileIDs.Count; p++) { - visible = false; + //Don't show profile if is selected, but if selected and guest + if (Data.ScreenNames.ProfileIDs[p] == i && _Base.Profiles.GetProfiles()[i].GuestProfile == EOffOn.TR_CONFIG_OFF) + { + visible = false; + break; + } } } if (visible)