mirror of https://github.com/oliverbooth/X10D
Remove unused Util class
This commit is contained in:
parent
24039d835c
commit
9f9a79fd1b
|
@ -1,21 +0,0 @@
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace X10D
|
|
||||||
{
|
|
||||||
internal static class Util
|
|
||||||
{
|
|
||||||
public static void SwapIfNeeded(ref byte[] buffer, Endianness endianness)
|
|
||||||
{
|
|
||||||
if (buffer is null)
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException(nameof(buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
var swapNeeded = BitConverter.IsLittleEndian == (endianness == Endianness.BigEndian);
|
|
||||||
if (swapNeeded)
|
|
||||||
{
|
|
||||||
Array.Reverse(buffer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue