[internal] - use built-in max finder

This commit is contained in:
ivandrofly 2015-09-08 19:55:59 +01:00
parent 767fd4eb48
commit 59cf9a4e08

View File

@ -224,9 +224,7 @@ namespace Nikse.SubtitleEdit.Forms
int index = 0;
Paragraph p1 = sub1.GetParagraphOrDefault(index);
Paragraph p2 = sub2.GetParagraphOrDefault(index);
int max = sub1.Paragraphs.Count;
if (max < sub2.Paragraphs.Count)
max = sub2.Paragraphs.Count;
int max = Math.Max(sub1.Paragraphs.Count, sub2.Paragraphs.Count);
while (index < max)
{
if (p1 != null && p2 != null)