From 3feb3f81bfe848aa829e7c129bee3cd060c23c05 Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Tue, 30 Apr 2024 21:32:59 +0200 Subject: More efficient array creation (#11468) --- MediaBrowser.Controller/Library/ItemResolveArgs.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'MediaBrowser.Controller/Library') 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() : new[] { Path }; - return AdditionalLocations is null ? paths : paths.Concat(AdditionalLocations).ToArray(); + var paths = string.IsNullOrEmpty(Path) ? Array.Empty() : [Path]; + return AdditionalLocations is null ? paths : [..paths, ..AdditionalLocations]; } } -- cgit v1.2.3