mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
GlitchyEngineHelper project
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Interop;
|
||||
|
||||
namespace xxHash
|
||||
{
|
||||
struct XXH64_hash : uint64{}
|
||||
|
||||
static
|
||||
{
|
||||
[LinkName(.C)]
|
||||
public static extern XXH64_hash XXH64(void* buffer, c_size size, XXH64_hash seed = 0);
|
||||
}
|
||||
|
||||
static class xxHash
|
||||
{
|
||||
[Inline]
|
||||
public static XXH64_hash ComputeHash(StringView string, XXH64_hash seed = 0)
|
||||
{
|
||||
return XXH64(string.Ptr, (.)string.Length, seed);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user