Commit 6a5f2eab authored by Martin Finkel's avatar Martin Finkel

Unify empty array initializations

parent 8cb6d989
......@@ -662,7 +662,12 @@ namespace LibVLCSharp.Shared
var discoverList = IntPtr.Zero;
var count = Native.LibVLCRendererDiscovererGetList(NativeReference, ref discoverList);
if (count == 0) return new RendererDescription[0];
if (count == 0)
#if NETSTANDARD1_1 || NET40
return new RendererDescription[0];
#else
return Array.Empty<RendererDescription>();
#endif
var rendererDiscovererDescription = new RendererDescription[(int)count];
......
......@@ -1158,8 +1158,12 @@ namespace LibVLCSharp.Shared
TrackDescription[] GetTrackDescription(IntPtr trackPtr)
{
if (trackPtr == IntPtr.Zero) return new TrackDescription[0];
if (trackPtr == IntPtr.Zero)
#if NETSTANDARD1_1 || NET40
return new TrackDescription[0];
#else
return Array.Empty<TrackDescription>();
#endif
var trackDescriptions = new List<TrackDescription>();
var track = MarshalUtils.PtrToStructure<TrackDescription>(trackPtr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment