diff options
| author | Bond_009 <bond.009@outlook.com> | 2023-10-06 00:40:09 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2023-10-06 01:04:25 +0200 |
| commit | b176beb88e22a36cc056439ac2a4df4fbe68f2c1 (patch) | |
| tree | 46988cc14ba7e8bdd9d6eb89588b1472f6caa25d /Emby.Dlna/DlnaManager.cs | |
| parent | 40f7eb4e8cd9e250fb3870a4799a5a8d949e2068 (diff) | |
Reduce string allocations
Some simple changes to reduce the number of allocated strings
Diffstat (limited to 'Emby.Dlna/DlnaManager.cs')
| -rw-r--r-- | Emby.Dlna/DlnaManager.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Emby.Dlna/DlnaManager.cs b/Emby.Dlna/DlnaManager.cs index 99b3e6e7ef..d67cb67b54 100644 --- a/Emby.Dlna/DlnaManager.cs +++ b/Emby.Dlna/DlnaManager.cs @@ -228,7 +228,7 @@ namespace Emby.Dlna try { return _fileSystem.GetFilePaths(path) - .Where(i => string.Equals(Path.GetExtension(i), ".xml", StringComparison.OrdinalIgnoreCase)) + .Where(i => Path.GetExtension(i.AsSpan()).Equals(".xml", StringComparison.OrdinalIgnoreCase)) .Select(i => ParseProfileFile(i, type)) .Where(i => i is not null) .ToList()!; // We just filtered out all the nulls |
