mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-26 05:02:36 +01:00
Cache maximum length outside loop
This commit is contained in:
parent
768059359d
commit
b6ce6d31a7
@ -1607,7 +1607,8 @@ namespace Nikse.SubtitleEdit.Core
|
||||
int i2 = 0;
|
||||
int i = 0;
|
||||
int c = 0;
|
||||
while (i < Math.Max(parts1.Length, parts2.Length) && i1 < parts1.Length && i2 < parts2.Length)
|
||||
var max = Math.Max(parts1.Length, parts2.Length);
|
||||
while (i < max && i1 < parts1.Length && i2 < parts2.Length)
|
||||
{
|
||||
if (parts1[i1] == parts2[i2])
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user