Browse Source

Removed unnecessary MemoryMarshal.Cast call

pull/1117/head
Sergio Pedri 6 years ago
parent
commit
fb8b82d1a1
  1. 2
      src/ImageSharp/Formats/Jpeg/Components/Block8x8.cs

2
src/ImageSharp/Formats/Jpeg/Components/Block8x8.cs

@ -35,7 +35,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components
public Block8x8(Span<short> coefficients)
{
ref byte selfRef = ref Unsafe.As<Block8x8, byte>(ref this);
ref byte sourceRef = ref MemoryMarshal.GetReference(MemoryMarshal.Cast<short, byte>(coefficients));
ref byte sourceRef = ref Unsafe.As<short, byte>(ref MemoryMarshal.GetReference(coefficients));
Unsafe.CopyBlock(ref selfRef, ref sourceRef, Size * sizeof(short));
}

Loading…
Cancel
Save