From a91dcc70b681d0230e960ec8eeaec4f9ff94b605 Mon Sep 17 00:00:00 2001 From: Thomas Altenburger Date: Mon, 16 Oct 2023 20:47:23 +0200 Subject: [PATCH] ILC warning (#8083) --- .../Platform/Graphics/Vertices/VertexBuffer.OpenGL.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MonoGame.Framework/Platform/Graphics/Vertices/VertexBuffer.OpenGL.cs b/MonoGame.Framework/Platform/Graphics/Vertices/VertexBuffer.OpenGL.cs index 1f4fa01615e..34730a77515 100644 --- a/MonoGame.Framework/Platform/Graphics/Vertices/VertexBuffer.OpenGL.cs +++ b/MonoGame.Framework/Platform/Graphics/Vertices/VertexBuffer.OpenGL.cs @@ -89,7 +89,7 @@ private void GetBufferData(int offsetInBytes, T[] data, int startIndex, int e var tmpPtr = tmpHandle.AddrOfPinnedObject(); for (var i = 0; i < elementCount; i++) { - data[startIndex + i] = (T)Marshal.PtrToStructure(tmpPtr, typeof(T)); + data[startIndex + i] = Marshal.PtrToStructure(tmpPtr); tmpPtr = (IntPtr)(tmpPtr.ToInt64() + vertexStride); } }