Make GetFunctionPointerForDelegate as explicit as possible (#7279)

Co-authored-by: gdk <gab.dark.100@gmail.com>
This commit is contained in:
Emmanuel Hansen
2024-09-15 20:39:10 +00:00
committed by GitHub
parent 2f36a6665c
commit 62216782ca
2 changed files with 344 additions and 171 deletions

View File

@ -1,5 +1,4 @@
using System;
using System.Runtime.InteropServices;
namespace ARMeilleure.Translation
{
@ -11,11 +10,10 @@ namespace ARMeilleure.Translation
public IntPtr FuncPtr { get; }
public DelegateInfo(Delegate dlg)
public DelegateInfo(Delegate dlg, IntPtr funcPtr)
{
_dlg = dlg;
FuncPtr = Marshal.GetFunctionPointerForDelegate<Delegate>(dlg);
FuncPtr = funcPtr;
}
}
}