Browse Source

Remove: CopyTo

AnnulusGames 1 year ago
parent
commit
2bc7844c97
2 changed files with 0 additions and 18 deletions
  1. 0 11
      src/Lua/Internal/FastStackCore.cs
  2. 0 7
      src/Lua/Runtime/LuaStack.cs

+ 0 - 11
src/Lua/Internal/FastStackCore.cs

@@ -85,15 +85,4 @@ public struct FastStackCore<T>
         array.AsSpan(0, tail).Clear();
         tail = 0;
     }
-
-    public void CopyTo(ref FastStackCore<T> destination)
-    {
-        if (destination.array.Length < array.Length)
-        {
-            Array.Resize(ref destination.array, array.Length);
-        }
-
-        array.AsSpan().CopyTo(destination.array);
-        destination.tail = tail;
-    }
 }

+ 0 - 7
src/Lua/Runtime/LuaStack.cs

@@ -94,13 +94,6 @@ public class LuaStack(int initialSize = 256)
 #endif
     }
 
-    public void CopyTo(LuaStack destination)
-    {
-        destination.EnsureCapacity(top);
-        array.AsSpan().CopyTo(destination.array);
-        destination.top = top;
-    }
-
     static void ThrowEmptyStack()
     {
         throw new InvalidOperationException("Empty stack");