summaryrefslogtreecommitdiff
path: root/src/mbgl/util/fnv_hash.hpp
blob: 87d4661c56972428a4ef1b76f975da529ca8fbf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
#pragma once

namespace mbgl {
namespace util {

inline constexpr uint64_t hashFNV1a(const char * str, uint64_t value = 0xcbf29ce484222325) {
    return str[0] ? hashFNV1a(str + 1, (value ^ uint64_t(str[0])) * 0x100000001b3) : value;
}

} // end namespace util
} // end namespace mbgl