diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2020-07-24 12:21:25 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-24 12:21:25 -0400 |
| commit | e3db0ac400e7a1a42e7a844a13ab052d26125612 (patch) | |
| tree | c72dcbc78fab6194731f17cd86ee028a6458d514 /Emby.Server.Implementations/Localization/LocalizationManager.cs | |
| parent | f5a3cc654fc8646e633489919b4a8b9e7d3c48fe (diff) | |
| parent | 928bc6c7875c4523ee158aabc0e2ffc46c691383 (diff) | |
Merge pull request #3657 from Bond-009/readonlyspan
Review usage of string.Substring (part 1)
Diffstat (limited to 'Emby.Server.Implementations/Localization/LocalizationManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Localization/LocalizationManager.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Localization/LocalizationManager.cs b/Emby.Server.Implementations/Localization/LocalizationManager.cs index 62a23118f..90e2766b8 100644 --- a/Emby.Server.Implementations/Localization/LocalizationManager.cs +++ b/Emby.Server.Implementations/Localization/LocalizationManager.cs @@ -247,7 +247,7 @@ namespace Emby.Server.Implementations.Localization } // Try splitting by : to handle "Germany: FSK 18" - var index = rating.IndexOf(':'); + var index = rating.IndexOf(':', StringComparison.Ordinal); if (index != -1) { rating = rating.Substring(index).TrimStart(':').Trim(); @@ -312,12 +312,12 @@ namespace Emby.Server.Implementations.Localization throw new ArgumentNullException(nameof(culture)); } - const string prefix = "Core"; - var key = prefix + culture; + const string Prefix = "Core"; + var key = Prefix + culture; return _dictionaries.GetOrAdd( key, - f => GetDictionary(prefix, culture, DefaultCulture + ".json").GetAwaiter().GetResult()); + f => GetDictionary(Prefix, culture, DefaultCulture + ".json").GetAwaiter().GetResult()); } private async Task<Dictionary<string, string>> GetDictionary(string prefix, string culture, string baseFilename) |
