1
0
Fork 0
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:
Brian Fiete 2020-12-04 07:45:42 -08:00
parent 195a699af4
commit 3f6eae6bfc
4 changed files with 6 additions and 1 deletions

View file

@ -41,6 +41,7 @@ namespace System
return (int)mA ^ (int)mK;
}
[Commutable]
public static bool operator==(Guid val1, Guid val2)
{
return

View file

@ -90,7 +90,7 @@ namespace System
return value.mValue;
}
[Inline]
[Inline, Commutable]
public static bool operator==(Nullable<T> lhs, T rhs)
{
if (!lhs.mHasValue) return false;

View file

@ -551,6 +551,7 @@ namespace System
return str.Ptr;
}
[Commutable]
public static bool operator==(String s1, String s2)
{
return Equals(s1, s2);
@ -2815,6 +2816,7 @@ namespace System
String.QuoteString(mPtr, mLength, outString);
}
[Commutable]
public static bool operator==(StringView val1, StringView val2)
{
if (val1.mLength != val2.mLength)
@ -2828,6 +2830,7 @@ namespace System
return String.[Friend]EqualsHelper(ptr1, ptr2, val1.mLength);
}
[Commutable]
public static bool operator==(StringView val1, String val2)
{
if (val1.mLength != val2.Length)

View file

@ -367,6 +367,7 @@ namespace System
}
}
[Commutable]
public static bool operator==(Variant v1, Variant v2)
{
if (v1.IsObject)