DSC Engine
Loading...
Searching...
No Matches
include
DSCEngine
types
hash.hpp
1
#pragma once
2
3
namespace
DSC
4
{
5
template
<
typename
T,
int
S>
int
default_hash(
const
T& item)
// not safe with VRAM
6
{
7
int
len =
sizeof
(item);
8
int
result = 0;
9
char
* o = (
char
*)&item;
10
for
(
int
i=0;i<len;i++)
11
result+=o[i];
12
return
result % S;
13
}
14
}
Generated by
1.9.5