Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
markaren committed May 13, 2024
1 parent 454db65 commit b4a4e50
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions export/src/fmu4cpp/hash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
//https://stackoverflow.com/questions/66764096/calculating-stdhash-using-different-compilers
inline uint64_t fnv1a(std::string const &text) {

if (sizeof(void*)==4) {
if (sizeof(void *) == 4) {
// 32-bit environment
uint32_t constexpr fnv_prime = 16777619U;
uint32_t constexpr fnv_offset_basis = 2166136261U;
uint32_t constexpr fnv_prime = 16777619U;
uint32_t constexpr fnv_offset_basis = 2166136261U;

uint32_t hash = fnv_offset_basis;
uint32_t hash = fnv_offset_basis;

for (auto c: text) {
hash ^= c;
Expand Down

0 comments on commit b4a4e50

Please sign in to comment.