mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-17 07:44:09 +02:00
Added some Commutable attributes
This commit is contained in:
parent
195a699af4
commit
3f6eae6bfc
4 changed files with 6 additions and 1 deletions
|
@ -41,6 +41,7 @@ namespace System
|
||||||
return (int)mA ^ (int)mK;
|
return (int)mA ^ (int)mK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Commutable]
|
||||||
public static bool operator==(Guid val1, Guid val2)
|
public static bool operator==(Guid val1, Guid val2)
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
|
|
|
@ -90,7 +90,7 @@ namespace System
|
||||||
return value.mValue;
|
return value.mValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Inline]
|
[Inline, Commutable]
|
||||||
public static bool operator==(Nullable<T> lhs, T rhs)
|
public static bool operator==(Nullable<T> lhs, T rhs)
|
||||||
{
|
{
|
||||||
if (!lhs.mHasValue) return false;
|
if (!lhs.mHasValue) return false;
|
||||||
|
|
|
@ -551,6 +551,7 @@ namespace System
|
||||||
return str.Ptr;
|
return str.Ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Commutable]
|
||||||
public static bool operator==(String s1, String s2)
|
public static bool operator==(String s1, String s2)
|
||||||
{
|
{
|
||||||
return Equals(s1, s2);
|
return Equals(s1, s2);
|
||||||
|
@ -2815,6 +2816,7 @@ namespace System
|
||||||
String.QuoteString(mPtr, mLength, outString);
|
String.QuoteString(mPtr, mLength, outString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Commutable]
|
||||||
public static bool operator==(StringView val1, StringView val2)
|
public static bool operator==(StringView val1, StringView val2)
|
||||||
{
|
{
|
||||||
if (val1.mLength != val2.mLength)
|
if (val1.mLength != val2.mLength)
|
||||||
|
@ -2828,6 +2830,7 @@ namespace System
|
||||||
return String.[Friend]EqualsHelper(ptr1, ptr2, val1.mLength);
|
return String.[Friend]EqualsHelper(ptr1, ptr2, val1.mLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Commutable]
|
||||||
public static bool operator==(StringView val1, String val2)
|
public static bool operator==(StringView val1, String val2)
|
||||||
{
|
{
|
||||||
if (val1.mLength != val2.Length)
|
if (val1.mLength != val2.Length)
|
||||||
|
|
|
@ -367,6 +367,7 @@ namespace System
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Commutable]
|
||||||
public static bool operator==(Variant v1, Variant v2)
|
public static bool operator==(Variant v1, Variant v2)
|
||||||
{
|
{
|
||||||
if (v1.IsObject)
|
if (v1.IsObject)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue