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:
parent
6dd49f5d9b
commit
b9debfe3bf
16 changed files with 16 additions and 16 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@ namespace System
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int IHashable.GetHashCode()
|
public int GetHashCode()
|
||||||
{
|
{
|
||||||
return (int32)this;
|
return (int32)this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace System
|
||||||
return (SelfBase)value;
|
return (SelfBase)value;
|
||||||
}
|
}
|
||||||
|
|
||||||
int IHashable.GetHashCode()
|
public int GetHashCode()
|
||||||
{
|
{
|
||||||
return (int)this;
|
return (int)this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace System
|
||||||
return (SelfBase)value;
|
return (SelfBase)value;
|
||||||
}
|
}
|
||||||
|
|
||||||
int IHashable.GetHashCode()
|
public int GetHashCode()
|
||||||
{
|
{
|
||||||
return (int)this;
|
return (int)this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace System
|
||||||
return (SelfBase)value;
|
return (SelfBase)value;
|
||||||
}
|
}
|
||||||
|
|
||||||
int IHashable.GetHashCode()
|
public int GetHashCode()
|
||||||
{
|
{
|
||||||
return (int)this;
|
return (int)this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace System
|
||||||
return (SelfBase)value;
|
return (SelfBase)value;
|
||||||
}
|
}
|
||||||
|
|
||||||
int IHashable.GetHashCode()
|
public int GetHashCode()
|
||||||
{
|
{
|
||||||
return (int)this;
|
return (int)this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace System
|
||||||
return (SelfBase)value;
|
return (SelfBase)value;
|
||||||
}
|
}
|
||||||
|
|
||||||
int IHashable.GetHashCode()
|
public int GetHashCode()
|
||||||
{
|
{
|
||||||
return (int)this;
|
return (int)this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace System
|
||||||
return (SelfBase)value;
|
return (SelfBase)value;
|
||||||
}
|
}
|
||||||
|
|
||||||
int IHashable.GetHashCode()
|
public int GetHashCode()
|
||||||
{
|
{
|
||||||
return (int)this;
|
return (int)this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue