diff options
| author | Bond-009 <bond.009@outlook.com> | 2024-04-30 21:32:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-30 13:32:59 -0600 |
| commit | 3feb3f81bfe848aa829e7c129bee3cd060c23c05 (patch) | |
| tree | c247db8e30d1cc52bc6735d45d86eff8955ee7e9 /MediaBrowser.Controller/Library/ItemResolveArgs.cs | |
| parent | 5dc6bb4910cfdc7f40ad83d647172d743e6e0595 (diff) | |
More efficient array creation (#11468)
Diffstat (limited to 'MediaBrowser.Controller/Library/ItemResolveArgs.cs')
| -rw-r--r-- | MediaBrowser.Controller/Library/ItemResolveArgs.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MediaBrowser.Controller/Library/ItemResolveArgs.cs b/MediaBrowser.Controller/Library/ItemResolveArgs.cs index 6202f92f5..b558ef73d 100644 --- a/MediaBrowser.Controller/Library/ItemResolveArgs.cs +++ b/MediaBrowser.Controller/Library/ItemResolveArgs.cs @@ -116,8 +116,8 @@ namespace MediaBrowser.Controller.Library { get { - var paths = string.IsNullOrEmpty(Path) ? Array.Empty<string>() : new[] { Path }; - return AdditionalLocations is null ? paths : paths.Concat(AdditionalLocations).ToArray(); + var paths = string.IsNullOrEmpty(Path) ? Array.Empty<string>() : [Path]; + return AdditionalLocations is null ? paths : [..paths, ..AdditionalLocations]; } } |
