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:
parent
939c818581
commit
d0e8332150
30 changed files with 180 additions and 432 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -110,6 +110,14 @@ namespace System
|
|||
}
|
||||
}
|
||||
|
||||
public T Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return Unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
public static implicit operator Result<T, TErr>(T value)
|
||||
{
|
||||
return .Ok(value);
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue