Skip to content

Commit

Permalink
Fixing FastFill functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
MainMemory committed May 14, 2015
1 parent 3fa2c34 commit 4663f6f
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions SonLVLAPI/Extensions.cs
Expand Up @@ -409,7 +409,6 @@ public static unsafe void FastFill(this ushort[] arr, ushort value, int startInd
if (startIndex < 0 || startIndex >= arr.Length) throw new ArgumentOutOfRangeException("startIndex");
if (length < 0 || startIndex + length > arr.Length) throw new ArgumentOutOfRangeException("length");
ulong longval = (ulong)value;
longval |= longval << 8;
longval |= longval << 16;
longval |= longval << 32;
fixed (ushort* fp = arr)
Expand All @@ -419,7 +418,6 @@ public static unsafe void FastFill(this ushort[] arr, ushort value, int startInd
public static unsafe void FastFill(this ushort[] arr, ushort value)
{
ulong longval = (ulong)value;
longval |= longval << 8;
longval |= longval << 16;
longval |= longval << 32;
fixed (ushort* fp = arr)
Expand All @@ -432,7 +430,6 @@ public static unsafe void FastFill(this short[] arr, short value, int startIndex
if (startIndex < 0 || startIndex >= arr.Length) throw new ArgumentOutOfRangeException("startIndex");
if (length < 0 || startIndex + length > arr.Length) throw new ArgumentOutOfRangeException("length");
ulong longval = (ulong)value;
longval |= longval << 8;
longval |= longval << 16;
longval |= longval << 32;
fixed (short* fp = arr)
Expand All @@ -442,7 +439,6 @@ public static unsafe void FastFill(this short[] arr, short value, int startIndex
public static unsafe void FastFill(this short[] arr, short value)
{
ulong longval = (ulong)value;
longval |= longval << 8;
longval |= longval << 16;
longval |= longval << 32;
fixed (short* fp = arr)
Expand All @@ -455,8 +451,6 @@ public static unsafe void FastFill(this uint[] arr, uint value, int startIndex,
if (startIndex < 0 || startIndex >= arr.Length) throw new ArgumentOutOfRangeException("startIndex");
if (length < 0 || startIndex + length > arr.Length) throw new ArgumentOutOfRangeException("length");
ulong longval = (ulong)value;
longval |= longval << 8;
longval |= longval << 16;
longval |= longval << 32;
fixed (uint* fp = arr)
FastFillInternal(fp + startIndex, longval, length * 4);
Expand All @@ -465,8 +459,6 @@ public static unsafe void FastFill(this uint[] arr, uint value, int startIndex,
public static unsafe void FastFill(this uint[] arr, uint value)
{
ulong longval = (ulong)value;
longval |= longval << 8;
longval |= longval << 16;
longval |= longval << 32;
fixed (uint* fp = arr)
FastFillInternal(fp, longval, arr.Length * 4);
Expand All @@ -478,8 +470,6 @@ public static unsafe void FastFill(this int[] arr, int value, int startIndex, in
if (startIndex < 0 || startIndex >= arr.Length) throw new ArgumentOutOfRangeException("startIndex");
if (length < 0 || startIndex + length > arr.Length) throw new ArgumentOutOfRangeException("length");
ulong longval = (ulong)value;
longval |= longval << 8;
longval |= longval << 16;
longval |= longval << 32;
fixed (int* fp = arr)
FastFillInternal(fp + startIndex, longval, length * 4);
Expand All @@ -488,8 +478,6 @@ public static unsafe void FastFill(this int[] arr, int value, int startIndex, in
public static unsafe void FastFill(this int[] arr, int value)
{
ulong longval = (ulong)value;
longval |= longval << 8;
longval |= longval << 16;
longval |= longval << 32;
fixed (int* fp = arr)
FastFillInternal(fp, longval, arr.Length * 4);
Expand All @@ -501,7 +489,6 @@ public static unsafe void FastFill(this char[] arr, char value, int startIndex,
if (startIndex < 0 || startIndex >= arr.Length) throw new ArgumentOutOfRangeException("startIndex");
if (length < 0 || startIndex + length > arr.Length) throw new ArgumentOutOfRangeException("length");
ulong longval = (ulong)value;
longval |= longval << 8;
longval |= longval << 16;
longval |= longval << 32;
fixed (char* fp = arr)
Expand All @@ -511,7 +498,6 @@ public static unsafe void FastFill(this char[] arr, char value, int startIndex,
public static unsafe void FastFill(this char[] arr, char value)
{
ulong longval = (ulong)value;
longval |= longval << 8;
longval |= longval << 16;
longval |= longval << 32;
fixed (char* fp = arr)
Expand Down

0 comments on commit 4663f6f

Please sign in to comment.