diff --git a/src/color.hpp b/src/color.hpp index 199dc38ef8ed..4de7acffedb1 100644 --- a/src/color.hpp +++ b/src/color.hpp @@ -254,7 +254,7 @@ namespace std template<> struct hash { - std::size_t operator()(const color_t& c) const + std::size_t operator()(const color_t& c) const noexcept { return c.to_rgba_bytes(); } diff --git a/src/map/location.hpp b/src/map/location.hpp index 0694eaa8ef32..5ee8a28f5303 100644 --- a/src/map/location.hpp +++ b/src/map/location.hpp @@ -210,7 +210,7 @@ std::ostream &operator<<(std::ostream &s, const std::vector& v); namespace std { template<> struct hash { - std::size_t operator()(const map_location& l) const { + std::size_t operator()(const map_location& l) const noexcept { // The 2000 bias supposedly ensures that the correct x is recovered for negative y // This implementation copied from the Lua location_set return (l.wml_x()) * 16384 + (l.wml_y()) + 2000;