mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-23 19:52:48 +01:00
Add readonly modifier for regex
This commit is contained in:
parent
385503cc3d
commit
77c5a5018c
@ -8,7 +8,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
{
|
||||
public class AdobeEncore : SubtitleFormat
|
||||
{
|
||||
private static Regex regexTimeCodes = new Regex(@"^\d\d:\d\d:\d\d:\d\d \d\d:\d\d:\d\d:\d\d ", RegexOptions.Compiled);
|
||||
private static readonly Regex regexTimeCodes = new Regex(@"^\d\d:\d\d:\d\d:\d\d \d\d:\d\d:\d\d:\d\d ", RegexOptions.Compiled);
|
||||
private int _maxMsDiv10 = 0;
|
||||
|
||||
public override string Extension
|
||||
|
@ -8,7 +8,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
{
|
||||
public class AdobeEncoreLineTabNewLine : SubtitleFormat
|
||||
{
|
||||
private static Regex regexTimeCodes = new Regex(@"^\d\d\d\d \d\d:\d\d:\d\d:\d\d \d\d:\d\d:\d\d:\d\d\t", RegexOptions.Compiled);
|
||||
private static readonly Regex regexTimeCodes = new Regex(@"^\d\d\d\d \d\d:\d\d:\d\d:\d\d \d\d:\d\d:\d\d:\d\d\t", RegexOptions.Compiled);
|
||||
|
||||
public override string Extension
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
{
|
||||
public class AdobeEncoreLineTabs : SubtitleFormat
|
||||
{
|
||||
private static Regex regexTimeCodes = new Regex(@"^\d\d\d\d\t\d\d:\d\d:\d\d:\d\d\t\d\d:\d\d:\d\d:\d\d\t", RegexOptions.Compiled);
|
||||
private static readonly Regex regexTimeCodes = new Regex(@"^\d\d\d\d\t\d\d:\d\d:\d\d:\d\d\t\d\d:\d\d:\d\d:\d\d\t", RegexOptions.Compiled);
|
||||
|
||||
public override string Extension
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
{
|
||||
public class AdobeEncoreTabs : SubtitleFormat
|
||||
{
|
||||
private static Regex regexTimeCodes = new Regex(@"^\d\d:\d\d:\d\d:\d\d\t\d\d:\d\d:\d\d:\d\d\t", RegexOptions.Compiled);
|
||||
private static readonly Regex regexTimeCodes = new Regex(@"^\d\d:\d\d:\d\d:\d\d\t\d\d:\d\d:\d\d:\d\d\t", RegexOptions.Compiled);
|
||||
|
||||
public override string Extension
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
{
|
||||
public class AdobeEncoreWithLineNumbers : SubtitleFormat
|
||||
{
|
||||
private static Regex regexTimeCodes = new Regex(@"^\d+ \d\d:\d\d:\d\d:\d\d \d\d:\d\d:\d\d:\d\d ", RegexOptions.Compiled);
|
||||
private static readonly Regex regexTimeCodes = new Regex(@"^\d+ \d\d:\d\d:\d\d:\d\d \d\d:\d\d:\d\d:\d\d ", RegexOptions.Compiled);
|
||||
|
||||
public override string Extension
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
{
|
||||
public class AdobeEncoreWithLineNumbersNtsc : SubtitleFormat
|
||||
{
|
||||
private static Regex regexTimeCodes = new Regex(@"^\d+ \d\d;\d\d;\d\d;\d\d \d\d;\d\d;\d\d;\d\d ", RegexOptions.Compiled);
|
||||
private static readonly Regex regexTimeCodes = new Regex(@"^\d+ \d\d;\d\d;\d\d;\d\d \d\d;\d\d;\d\d;\d\d ", RegexOptions.Compiled);
|
||||
|
||||
public override string Extension
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
{
|
||||
public class AvidCaption : SubtitleFormat
|
||||
{
|
||||
private static Regex regexTimeCodes = new Regex(@"^\d\d:\d\d:\d\d:\d\d \d\d:\d\d:\d\d:\d\d$", RegexOptions.Compiled);
|
||||
private static readonly Regex regexTimeCodes = new Regex(@"^\d\d:\d\d:\d\d:\d\d \d\d:\d\d:\d\d:\d\d$", RegexOptions.Compiled);
|
||||
|
||||
public override string Extension
|
||||
{
|
||||
|
@ -10,7 +10,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
public class CapMakerPlus : SubtitleFormat
|
||||
{
|
||||
|
||||
private static Regex regexTimeCodes = new Regex(@"^\d\d:\d\d:\d\d:\d\d$", RegexOptions.Compiled);
|
||||
private static readonly Regex regexTimeCodes = new Regex(@"^\d\d:\d\d:\d\d:\d\d$", RegexOptions.Compiled);
|
||||
|
||||
public override string Extension
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
{
|
||||
public class YouTubeTranscript : SubtitleFormat
|
||||
{
|
||||
private static Regex regexTimeCodes = new Regex(@"^\d{1,3}:\d\d$", RegexOptions.Compiled);
|
||||
private static readonly Regex regexTimeCodes = new Regex(@"^\d{1,3}:\d\d$", RegexOptions.Compiled);
|
||||
|
||||
public override string Extension
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
{
|
||||
public class YouTubeTranscriptOneLine : SubtitleFormat
|
||||
{
|
||||
private static Regex regexTimeCodes = new Regex(@"^\d{1,3}:\d\d.+$", RegexOptions.Compiled);
|
||||
private static readonly Regex regexTimeCodes = new Regex(@"^\d{1,3}:\d\d.+$", RegexOptions.Compiled);
|
||||
|
||||
public override string Extension
|
||||
{
|
||||
|
@ -5,7 +5,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
{
|
||||
public class TimeCode
|
||||
{
|
||||
public static TimeCode MaxTime = new TimeCode(99, 59, 59, 999);
|
||||
public static readonly TimeCode MaxTime = new TimeCode(99, 59, 59, 999);
|
||||
|
||||
public const double BaseUnit = 1000.0; // Base unit of time
|
||||
private double _totalMilliseconds;
|
||||
|
Loading…
Reference in New Issue
Block a user