diff --git a/src/libse/Common/StringExtensions.cs b/src/libse/Common/StringExtensions.cs index edd3eff5c..246fecdbb 100644 --- a/src/libse/Common/StringExtensions.cs +++ b/src/libse/Common/StringExtensions.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Globalization; -using System.Linq; using System.Text; namespace Nikse.SubtitleEdit.Core.Common @@ -471,12 +470,13 @@ namespace Nikse.SubtitleEdit.Core.Common public static string RemoveChar(this string value, params char[] charsToRemove) { + var h = new HashSet(charsToRemove); char[] array = new char[value.Length]; int arrayIndex = 0; for (int i = 0; i < value.Length; i++) { char ch = value[i]; - if (!charsToRemove.Contains(ch)) + if (!h.Contains(ch)) { array[arrayIndex++] = ch; } diff --git a/src/ui/Forms/Main.cs b/src/ui/Forms/Main.cs index 85fca49b9..25d5c2560 100644 --- a/src/ui/Forms/Main.cs +++ b/src/ui/Forms/Main.cs @@ -15603,7 +15603,7 @@ namespace Nikse.SubtitleEdit.Forms } e.SuppressKeyPress = true; } - else if (e.KeyCode == Keys.A && e.Modifiers == (Keys.Control | Keys.Alt | Keys.Shift)) + else if (e.KeyCode == Keys.A && e.Modifiers == (Keys.Control | Keys.Alt | Keys.Shift)) { if (GetCurrentSubtitleFormat().GetType() == typeof(AdvancedSubStationAlpha)) {