mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Removed Utils again
This commit is contained in:
parent
be9206c27a
commit
283727b88a
@ -123,21 +123,4 @@ public static bool UnpackMessage(byte[] message, out ushort msgType, out byte[]
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Utils
|
||||
{
|
||||
// string.GetHashCode is not guaranteed to be the same on all machines, but
|
||||
// we need one that is the same on all machines. simple and stupid:
|
||||
// IMPORTANT: needs to be the same one as in Weaver
|
||||
public static int GetStableHashCode(string text)
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
int hash = 23;
|
||||
foreach (char c in text)
|
||||
hash = hash * 31 + c;
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user