summaryrefslogtreecommitdiff
path: root/LibTSforge/Common.cs
diff options
context:
space:
mode:
Diffstat (limited to 'LibTSforge/Common.cs')
-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