Commit 47b75cf9 authored by Dominik Charousset's avatar Dominik Charousset

Add missing noexcept specifiers

parent 67f273ac
...@@ -82,18 +82,18 @@ public: ...@@ -82,18 +82,18 @@ public:
return apply(static_cast<std::underlying_type_t<Enum>>(x)); return apply(static_cast<std::underlying_type_t<Enum>>(x));
} }
void begin_sequence(size_t) { void begin_sequence(size_t) noexcept {
// nop // nop
} }
void end_sequence() { void end_sequence() noexcept {
// nop // nop
} }
/// Convenience function for computing an FNV1a hash value for given /// Convenience function for computing an FNV1a hash value for given
/// arguments in one shot. /// arguments in one shot.
template <class... Ts> template <class... Ts>
static T compute(Ts&&... xs) { static T compute(Ts&&... xs) noexcept {
fnv f; fnv f;
f(std::forward<Ts>(xs)...); f(std::forward<Ts>(xs)...);
return f.value; return f.value;
...@@ -102,14 +102,14 @@ public: ...@@ -102,14 +102,14 @@ public:
T value; T value;
private: private:
static constexpr T init() { static constexpr T init() noexcept {
if constexpr (sizeof(T) == 4) if constexpr (sizeof(T) == 4)
return 0x811C9DC5u; return 0x811C9DC5u;
else else
return 0xCBF29CE484222325ull; return 0xCBF29CE484222325ull;
} }
void append(const uint8_t* begin, const uint8_t* end) { void append(const uint8_t* begin, const uint8_t* end) noexcept {
if constexpr (sizeof(T) == 4) if constexpr (sizeof(T) == 4)
while (begin != end) while (begin != end)
value = (*begin++ ^ value) * 0x01000193u; value = (*begin++ ^ value) * 0x01000193u;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment