1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-19 16:40:26 +02:00

Moving corlib files out of "System" directory into root

This commit is contained in:
Brian Fiete 2019-09-19 05:46:35 -07:00
parent 4cd58262e4
commit 7dbfd15292
179 changed files with 3 additions and 0 deletions

View file

@ -0,0 +1,40 @@
namespace System
{
class Delegate
{
void* mFuncPtr;
void* mTarget;
public static bool Equals(Delegate a, Delegate b)
{
if ((Object)a == (Object)b)
return true;
if ((Object)a == null || (Object)b == null)
return false;
return (a.mFuncPtr == b.mFuncPtr) && (a.mTarget == b.mTarget);
}
public Result<void*> GetFuncPtr()
{
if (mTarget != null)
return .Err; //("Delegate target method must be static");
return mFuncPtr;
}
public void* GetTarget()
{
return mTarget;
}
public void SetFuncPtr(void* ptr, void* target = null)
{
mTarget = target;
mFuncPtr = ptr;
}
}
struct Function : int
{
}
}