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

Fixed some tooltips, added Link Dependencies, more int-ness

This commit is contained in:
Brian Fiete 2019-12-21 05:48:44 -08:00
parent 939c818581
commit d0e8332150
30 changed files with 180 additions and 432 deletions

View file

@ -418,36 +418,36 @@ namespace System.Collections.Generic
return Enumerator(this);
}
public int_cosize FindIndex(Predicate<T> match)
public int FindIndex(Predicate<T> match)
{
for (int_cosize i = 0; i < mSize; i++)
for (int i = 0; i < mSize; i++)
if (match(mItems[i]))
return i;
return -1;
}
public int_cosize IndexOf(T item)
public int IndexOf(T item)
{
//return Array.IndexOf(mItems, item, 0, mSize);
for (int i = 0; i < mSize; i++)
if (mItems[i] == item)
return (int_cosize)i;
return i;
return -1;
}
public int_cosize IndexOf(T item, int index)
public int IndexOf(T item, int index)
{
for (int i = index; i < mSize; i++)
if (mItems[i] == item)
return (int_cosize)i;
return i;
return -1;
}
public int_cosize IndexOf(T item, int index, int count)
public int IndexOf(T item, int index, int count)
{
for (int i = index; i < index + count; i++)
if (mItems[i] == item)
return (int_cosize)i;
return i;
return -1;
}
@ -571,7 +571,7 @@ namespace System.Collections.Generic
public bool Remove(T item)
{
int_cosize index = IndexOf(item);
int index = IndexOf(item);
if (index >= 0)
{
RemoveAt(index);

View file

@ -26,7 +26,26 @@ namespace System
}
}
public int32 Count
public bool IsEmpty
{
get
{
Object data = Internal.UnsafeCastToObject((void*)(mData & sDataMask));
if (data == null)
return true;
var type = data.GetType();
if (type == typeof(List<T>))
{
var list = (List<T>)data;
return list.Count == 0;
}
return false;
}
}
public int Count
{
get
{
@ -39,7 +58,7 @@ namespace System
if (type == typeof(List<T>))
{
var list = (List<T>)data;
return (int32)list.Count;
return list.Count;
}
return 1;
}

View file

@ -80,8 +80,10 @@ namespace System.Reflection
var retType = Type.GetType(mMethodData.mReturnType);
FFIABI abi = .Default;
#if BF_PLATFORM_WINDOWS
if (mMethodData.mFlags.HasFlag(.StdCall))
#if BF_PLATFORM_WINDOWS && BF_32_BIT
if (mMethodData.mFlags.HasFlag(.ThisCall))
abi = .ThisCall;
else if (!mMethodData.mFlags.HasFlag(.Static))
abi = .StdCall;
#endif

View file

@ -110,6 +110,14 @@ namespace System
}
}
public T Value
{
get
{
return Unwrap();
}
}
public static implicit operator Result<T, TErr>(T value)
{
return .Ok(value);

View file

@ -902,6 +902,7 @@ namespace System.Reflection
SpecialName = 0x0800, // Method is special. Name describes how.
StdCall = 0x1000,
FastCall = 0x2000,
ThisCall = 0x3000, // Purposely resuing StdCall|FastCall
Mutating = 0x4000
}
}

View file

@ -1373,7 +1373,7 @@ namespace System
[CLink, StdCall]
public static extern HWnd GetActiveWindow();
[CLink, StdCall]
[Import("user32.lib"), CLink, StdCall]
public static extern HWnd SetActiveWindow(HWnd wnd);
[CLink, StdCall]