Added SkipLocalsInitAttribute to Sample-Methods

This commit is contained in:
DarthAffe committed 2023-04-13 02:03:13 +02:00
1 parent 4ee55c6725
commit 260a820b80
3 files changed
+5

No files matched your search

@@ -1,5 +1,6 @@
using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using RGB.NET.Core;
@@ -19,6 +20,7 @@ public class AverageByteSampler : ISampler<byte>
#region Methods
/// <inheritdoc />
[SkipLocalsInit]
public unsafe void Sample(in SamplerInfo<byte> info, in Span<byte> pixelData)
{
int count = info.Width * info.Height;
@@ -1,5 +1,6 @@
using System;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using RGB.NET.Core;
@@ -13,6 +14,7 @@ public class AverageFloatSampler : ISampler<float>
#region Methods
/// <inheritdoc />
[SkipLocalsInit]
public unsafe void Sample(in SamplerInfo<float> info, in Span<float> pixelData)
{
int count = info.Width * info.Height;