From 500c329fa1a1933c780149c76339dbbc94ffd6c1 Mon Sep 17 00:00:00 2001 From: Gregory A Lundberg Date: Mon, 27 Aug 2018 19:35:04 -0500 Subject: [PATCH] Fix error: missing noexcept GCC 8.2.0 -Wnoexcept flags two functions which should be marked as not throwing. --- src/color.hpp | 2 +- src/map/location.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/color.hpp b/src/color.hpp index 16e93dafe1db..a10985c17077 100644 --- a/src/color.hpp +++ b/src/color.hpp @@ -250,7 +250,7 @@ namespace std template<> struct hash { - size_t operator()(const color_t& c) const + 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 66e9dfbea810..ff4066ae06cb 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 { - size_t operator()(const map_location& l) const { + 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;