Fix error: missing noexcept

GCC 8.2.0 -Wnoexcept flags two functions which should be marked as not throwing.

(cherry-picked from commit 3826c263b1)
This commit is contained in:
Gregory A Lundberg 2018-08-27 19:35:04 -05:00 committed by Jyrki Vesterinen
parent 695fa69238
commit cbeb882d60
2 changed files with 2 additions and 2 deletions

View file

@ -254,7 +254,7 @@ namespace std
template<>
struct hash<color_t>
{
std::size_t operator()(const color_t& c) const
std::size_t operator()(const color_t& c) const noexcept
{
return c.to_rgba_bytes();
}

View file

@ -210,7 +210,7 @@ std::ostream &operator<<(std::ostream &s, const std::vector<map_location>& v);
namespace std {
template<>
struct hash<map_location> {
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;