MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / fnv1a_32

Function fnv1a_32

include/chaiscript/utility/fnv1a.hpp:23–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21
22
23 static constexpr std::uint32_t fnv1a_32(const char *s, std::uint32_t h = 0x811c9dc5) {
24#ifdef __GNUC__
25#pragma GCC diagnostic push
26#pragma GCC diagnostic ignored "-Wsign-conversion"
27#endif
28
29#ifdef CHAISCRIPT_MSVC
30#pragma warning(push)
31#pragma warning(disable : 4307)
32#endif
33 return (*s == 0) ? h : fnv1a_32(s+1, ((h ^ (*s)) * 0x01000193));
34#ifdef CHAISCRIPT_MSVC
35#pragma warning(pop)
36#endif
37
38#ifdef __GNUC__
39#pragma GCC diagnostic pop
40#endif
41
42 }
43
44
45 }

Callers 2

IdMethod · 0.85
to_operatorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected