Merge pull request #1122 from ivandrofly/patch-1.1

Break the loop whenever `found` is set to true
This commit is contained in:
Nikolaj Olsson 2015-08-08 08:40:19 +02:00
commit 5fb1f7e216

View File

@ -923,7 +923,10 @@ namespace Nikse.SubtitleEdit.Forms
foreach (CultureInfo ci in cultures)
{
if (ci.ThreeLetterISOLanguageName == culture.ThreeLetterISOLanguageName)
{
found = true;
break;
}
}
if (!found)
cultures.Add(culture);
@ -934,7 +937,10 @@ namespace Nikse.SubtitleEdit.Forms
foreach (CultureInfo ci in cultures)
{
if (ci.ThreeLetterISOLanguageName == culture.ThreeLetterISOLanguageName)
{
found = true;
break;
}
}
if (!found)
cultures.Add(culture);
@ -950,7 +956,10 @@ namespace Nikse.SubtitleEdit.Forms
foreach (CultureInfo ci in cultures)
{
if (ci.ThreeLetterISOLanguageName == culture.ThreeLetterISOLanguageName)
{
found = true;
break;
}
}
if (!found)
cultures.Add(culture);
@ -961,7 +970,10 @@ namespace Nikse.SubtitleEdit.Forms
foreach (CultureInfo ci in cultures)
{
if (ci.ThreeLetterISOLanguageName == culture.ThreeLetterISOLanguageName)
{
found = true;
break;
}
}
if (!found)
cultures.Add(culture);