[Misc] Replaced const with constexpr where possible
This commit is contained in:
committed by
Radosław Gliński
parent
d20620eb5e
commit
5f918ef28d
@@ -82,10 +82,10 @@ std::string upper_ascii(const std::string_view view) {
|
||||
|
||||
template <bool LOWER>
|
||||
inline size_t hash_fnv1a(const std::string_view view) {
|
||||
const size_t offset_basis = 0xCBF29CE484222325ull;
|
||||
constexpr size_t offset_basis = 0xCBF29CE484222325ull;
|
||||
// chrispy: constant capture errors on clang
|
||||
auto work = [](size_t hash, uint8_t byte_of_data) {
|
||||
const size_t prime = 0x00000100000001B3ull;
|
||||
constexpr size_t prime = 0x00000100000001B3ull;
|
||||
hash ^= byte_of_data;
|
||||
hash *= prime;
|
||||
return hash;
|
||||
|
||||
Reference in New Issue
Block a user