remove unused CastToStruct function

This commit is contained in:
Lyssa 2025-04-06 19:35:08 +04:00
parent be6682e8c3
commit 3f1c878318

View File

@ -149,20 +149,6 @@ namespace LibTSforge
}
return result;
}
public static T CastToStruct<T>(this byte[] data) where T : struct
{
GCHandle handle = GCHandle.Alloc(data, GCHandleType.Pinned);
try
{
IntPtr ptr = handle.AddrOfPinnedObject();
return (T)Marshal.PtrToStructure(ptr, typeof(T));
}
finally
{
handle.Free();
}
}
}
public static class FileStreamExt