1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Disallowed [Inline] on properties

This commit is contained in:
Brian Fiete 2020-02-20 09:31:27 -08:00
parent ace51cb7be
commit a781f29c31
5 changed files with 9 additions and 17 deletions

View file

@ -102,7 +102,7 @@ namespace System
}
}
[AttributeUsage(.Method | .Constructor | .Invocation | .Property)]
[AttributeUsage(.Method | .Constructor | .Invocation)]
public struct InlineAttribute : Attribute
{

View file

@ -102,7 +102,7 @@ namespace System
}
}
[AttributeUsage(.Method | .Constructor | .Invocation | .Property)]
[AttributeUsage(.Method | .Constructor | .Invocation)]
public struct InlineAttribute : Attribute
{

View file

@ -15,15 +15,15 @@ namespace System
mValue = value;
}
[Inline]
public bool HasValue
{
[Inline]
get { return mHasValue; }
}
[Inline]
public T Value
{
[Inline]
get
{
if (!mHasValue)
@ -35,9 +35,9 @@ namespace System
}
}
[Inline]
public ref T ValueRef
{
[Inline]
get mut
{
if (!mHasValue)

View file

@ -125,14 +125,6 @@ namespace System
//PrintF("Object.GCMarkMembers %08X\n", this);
}
public static Object ManualInit(void* ptr, TypeInstance typeInst)
{
void* addr = ptr;
let obj = *((Object*)&addr);
*(int*)&obj.mClassVData = *(int*)&typeInst.mTypeClassVData;
return obj;
}
static void ToString(Object obj, String strBuffer)
{
if (obj == null)

View file

@ -51,27 +51,27 @@ namespace System
return Span<T>(array);
}
[Inline]
public int Length
{
[Inline]
get
{
return mLength;
}
}
[Inline]
public T* Ptr
{
[Inline]
get
{
return mPtr;
}
}
[Inline]
public T* EndPtr
{
[Inline]
get
{
return mPtr + mLength;
@ -281,9 +281,9 @@ namespace System
}
[Inline]
public T* Ptr
{
[Inline]
get
{
return mPtr;