Narrow constraint on generic GetDelegateForFunctionPointer ext. method
This commit is contained in:
parent
cbd875376e
commit
fabf518c73
|
@ -48,10 +48,8 @@ namespace BizHawk.BizInvoke
|
|||
public static class CallingConventionAdapterExtensions
|
||||
{
|
||||
public static T GetDelegateForFunctionPointer<T>(this ICallingConventionAdapter a, IntPtr p)
|
||||
where T : class
|
||||
{
|
||||
return (T)(object)a.GetDelegateForFunctionPointer(p, typeof(T));
|
||||
}
|
||||
where T : Delegate
|
||||
=> (T) a.GetDelegateForFunctionPointer(p, typeof(T));
|
||||
}
|
||||
|
||||
public class ParameterInfo
|
||||
|
|
Loading…
Reference in New Issue