[Misc] Replaced const with constexpr where possible

This commit is contained in:
Xphalnos
2025-03-20 21:16:32 +01:00
committed by Radosław Gliński
parent d20620eb5e
commit 5f918ef28d
64 changed files with 191 additions and 190 deletions

View File

@@ -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;