From 0af0fe62dfa8d5537ce608ed031975617f34629b Mon Sep 17 00:00:00 2001 From: Ivandro Ismael Date: Sat, 27 Feb 2016 11:15:29 +0000 Subject: [PATCH] [SubtitleFormat] - Update (UnknownSubtitle3.cs) --- libse/SubtitleFormats/UnknownSubtitle3.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libse/SubtitleFormats/UnknownSubtitle3.cs b/libse/SubtitleFormats/UnknownSubtitle3.cs index a612d2960..c3719e7ed 100644 --- a/libse/SubtitleFormats/UnknownSubtitle3.cs +++ b/libse/SubtitleFormats/UnknownSubtitle3.cs @@ -4,13 +4,13 @@ using System.Text; namespace Nikse.SubtitleEdit.Core.SubtitleFormats { - //Subtitle number: 1 //Start time (or frames): 00:00:48,862:0000001222 //End time (or frames): 00:00:50,786:0000001270 //Subtitle text: In preajma lacului Razel, public class UnknownSubtitle3 : SubtitleFormat { + private static readonly char[] SplitChar = { '|' }; public override string Extension { @@ -64,14 +64,14 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats { // 150583||3968723||Rythme standard quatre-par-quatre.\~- Sûr... Accord d'entrée, D majeur?|| // 155822||160350||Rob n'y connait rien en claviers. Il\~commence chaque chanson en D majeur|| - string[] parts = line.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); + string[] parts = line.Split(SplitChar, StringSplitOptions.RemoveEmptyEntries); if (parts.Length == 3) { int start; int end; if (int.TryParse(parts[0], out start) && int.TryParse(parts[1], out end)) { - Paragraph p = new Paragraph(parts[2].Replace("\\~", Environment.NewLine), start, end); + var p = new Paragraph(parts[2].Replace("\\~", Environment.NewLine), start, end); subtitle.Paragraphs.Add(p); } else