1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-23 00:38:47 +00:00

[ci skip] Revert 167a55e2db

Code analysis can suck an egg. We needed this actually
This commit is contained in:
Oliver Booth 2023-03-23 15:07:01 +00:00
parent 167a55e2db
commit 136382a2a3
No known key found for this signature in database
GPG Key ID: 20BEB9DC87961025

View File

@ -158,7 +158,7 @@ public static class SpanExtensions
/// <returns>An 8-bit unsigned integer containing the packed booleans.</returns>
/// <exception cref="ArgumentException"><paramref name="source" /> contains more than 8 elements.</exception>
[Pure]
public static byte PackByte(this ReadOnlySpan<bool> source)
public static unsafe byte PackByte(this ReadOnlySpan<bool> source)
{
switch (source.Length)
{
@ -230,7 +230,7 @@ public static class SpanExtensions
/// <returns>A 16-bit signed integer containing the packed booleans.</returns>
/// <exception cref="ArgumentException"><paramref name="source" /> contains more than 16 elements.</exception>
[Pure]
public static short PackInt16(this ReadOnlySpan<bool> source)
public static unsafe short PackInt16(this ReadOnlySpan<bool> source)
{
switch (source.Length)
{
@ -299,7 +299,7 @@ public static class SpanExtensions
/// <returns>A 32-bit signed integer containing the packed booleans.</returns>
/// <exception cref="ArgumentException"><paramref name="source" /> contains more than 32 elements.</exception>
[Pure]
public static int PackInt32(this ReadOnlySpan<bool> source)
public static unsafe int PackInt32(this ReadOnlySpan<bool> source)
{
switch (source.Length)
{
@ -413,7 +413,7 @@ public static class SpanExtensions
/// <returns>A 64-bit signed integer containing the packed booleans.</returns>
/// <exception cref="ArgumentException"><paramref name="source" /> contains more than 64 elements.</exception>
[Pure]
public static long PackInt64(this ReadOnlySpan<bool> source)
public static unsafe long PackInt64(this ReadOnlySpan<bool> source)
{
switch (source.Length)
{