Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Martin Finkel
LibVLCSharp
Commits
6a5f2eab
Commit
6a5f2eab
authored
Sep 26, 2018
by
Martin Finkel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unify empty array initializations
parent
8cb6d989
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
LibVLCSharp/Shared/LibVLC.cs
LibVLCSharp/Shared/LibVLC.cs
+6
-1
LibVLCSharp/Shared/MediaPlayer.cs
LibVLCSharp/Shared/MediaPlayer.cs
+6
-2
No files found.
LibVLCSharp/Shared/LibVLC.cs
View file @
6a5f2eab
...
...
@@ -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
];
...
...
LibVLCSharp/Shared/MediaPlayer.cs
View file @
6a5f2eab
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment