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

Made GetHashCode public for primitives

This commit is contained in:
Brian Fiete 2020-02-18 08:41:14 -08:00
parent 6dd49f5d9b
commit b9debfe3bf
16 changed files with 16 additions and 16 deletions

View file

@ -7,7 +7,7 @@ namespace System
strBuffer.Append(((bool)this) ? "true" : "false"); strBuffer.Append(((bool)this) ? "true" : "false");
} }
int IHashable.GetHashCode() public int GetHashCode()
{ {
return ((bool)this) ? 1 : 0; return ((bool)this) ? 1 : 0;
} }

View file

@ -14,7 +14,7 @@ namespace System
internal const char16 HIGH_SURROGATE_END = (char16)0xdbff; internal const char16 HIGH_SURROGATE_END = (char16)0xdbff;
internal const char16 LOW_SURROGATE_START = (char16)0xdc00; internal const char16 LOW_SURROGATE_START = (char16)0xdc00;
int IHashable.GetHashCode() public int GetHashCode()
{ {
return (int)this; return (int)this;
} }

View file

@ -2,7 +2,7 @@ namespace System
{ {
struct Char32 : char32, IHashable struct Char32 : char32, IHashable
{ {
int IHashable.GetHashCode() public int GetHashCode()
{ {
return (int)this; return (int)this;
} }

View file

@ -109,7 +109,7 @@ namespace System
} }
} }
int IHashable.GetHashCode() public int GetHashCode()
{ {
return (int32)this; return (int32)this;
} }

View file

@ -33,7 +33,7 @@ namespace System
return (double)value; return (double)value;
} }
int IHashable.GetHashCode() public int GetHashCode()
{ {
double d = (double)this; double d = (double)this;
if (d == 0) if (d == 0)

View file

@ -32,7 +32,7 @@ namespace System
} }
}*/ }*/
int IHashable.GetHashCode() public int GetHashCode()
{ {
var val = (float)this; var val = (float)this;
return *(int32*)(&val); return *(int32*)(&val);

View file

@ -26,7 +26,7 @@ namespace System
return (SelfBase)value; return (SelfBase)value;
} }
int IHashable.GetHashCode() public int GetHashCode()
{ {
return (int)this; return (int)this;
} }

View file

@ -20,7 +20,7 @@ namespace System
return (SelfBase)value; return (SelfBase)value;
} }
int IHashable.GetHashCode() public int GetHashCode()
{ {
return (int)this; return (int)this;
} }

View file

@ -29,7 +29,7 @@ namespace System
return (SelfBase)value; return (SelfBase)value;
} }
int IHashable.GetHashCode() public int GetHashCode()
{ {
return (int)this; return (int)this;
} }

View file

@ -30,7 +30,7 @@ namespace System
return -(SelfBase)value; return -(SelfBase)value;
} }
int IHashable.GetHashCode() public int GetHashCode()
{ {
return (int)(int64)this; return (int)(int64)this;
} }

View file

@ -20,7 +20,7 @@ namespace System
return (SelfBase)value; return (SelfBase)value;
} }
int IHashable.GetHashCode() public int GetHashCode()
{ {
return (int)this; return (int)this;
} }

View file

@ -27,7 +27,7 @@ namespace System
return (SelfBase)lhs + (SelfBase)rhs; return (SelfBase)lhs + (SelfBase)rhs;
} }
int IHashable.GetHashCode() public int GetHashCode()
{ {
return (int)this; return (int)this;
} }

View file

@ -20,7 +20,7 @@ namespace System
return (SelfBase)value; return (SelfBase)value;
} }
int IHashable.GetHashCode() public int GetHashCode()
{ {
return (int)this; return (int)this;
} }

View file

@ -22,7 +22,7 @@ namespace System
return (SelfBase)lhs + (SelfBase)rhs; return (SelfBase)lhs + (SelfBase)rhs;
} }
int IHashable.GetHashCode() public int GetHashCode()
{ {
return (int)this; return (int)this;
} }

View file

@ -24,7 +24,7 @@ namespace System
return (SelfBase)lhs + (SelfBase)rhs; return (SelfBase)lhs + (SelfBase)rhs;
} }
int IHashable.GetHashCode() public int GetHashCode()
{ {
return (int)this; return (int)this;
} }

View file

@ -20,7 +20,7 @@ namespace System
return (SelfBase)value; return (SelfBase)value;
} }
int IHashable.GetHashCode() public int GetHashCode()
{ {
return (int)this; return (int)this;
} }