diff options
| author | Hubert Jarosz | 2016-03-09 00:00:52 +0100 |
|---|---|---|
| committer | Hubert Jarosz | 2016-03-09 00:00:52 +0100 |
| commit | 4a4f2479146aa33e235ed57cde311efda68d3c8f (patch) | |
| tree | cf91f2869ff8f058c6682569fb31e22e5ee736ad /core/hashfuncs.h | |
| parent | 1dad6eca812e5c2e313b54265114de8a1d73d999 (diff) | |
| download | godot-4a4f2479146aa33e235ed57cde311efda68d3c8f.tar.gz godot-4a4f2479146aa33e235ed57cde311efda68d3c8f.tar.zst godot-4a4f2479146aa33e235ed57cde311efda68d3c8f.zip | |
Diffstat (limited to 'core/hashfuncs.h')
| -rw-r--r-- | core/hashfuncs.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/hashfuncs.h b/core/hashfuncs.h index c2ed5bd67..a917ee5ed 100644 --- a/core/hashfuncs.h +++ b/core/hashfuncs.h @@ -47,10 +47,10 @@ static inline uint32_t hash_djb2(const char *p_cstr) { const unsigned char* chr=(const unsigned char*)p_cstr; uint32_t hash = 5381; uint32_t c; - + while ((c = *chr++)) hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ - + return hash; } @@ -86,7 +86,7 @@ static inline uint32_t make_uint32_t(T p_in) { T t; uint32_t _u32; } _u; - _u._u32=0; + _u._u32=0; _u.t=p_in; return _u._u32; } @@ -106,7 +106,7 @@ static inline uint64_t make_uint64_t(T p_in) { uint64_t _u64; } _u; _u._u64=0; // in case p_in is smaller - + _u.t=p_in; return _u._u64; } |
