summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLyssa2025-04-06 15:35:08 +0000
committerLyssa2025-04-06 15:35:08 +0000
commit3f1c87831802817f0cb3effacde954d3cbadfb6c (patch)
tree78b9da632237b19e46ca984cefa8ed89f2859bcf
parentbe6682e8c3920a41ea67616582744c132def0f97 (diff)
downloadTSforge-3f1c87831802817f0cb3effacde954d3cbadfb6c.zip
remove unused CastToStruct function
-rw-r--r--LibTSforge/Common.cs14
1 files changed, 0 insertions, 14 deletions
diff --git a/LibTSforge/Common.cs b/LibTSforge/Common.cs
index a45870d..6b05bce 100644
--- a/LibTSforge/Common.cs
+++ b/LibTSforge/Common.cs
@@ -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