Skip to content

Commit

Permalink
Fix error: missing noexcept
Browse files Browse the repository at this point in the history
GCC 8.2.0 -Wnoexcept flags two functions which should be marked as not throwing.
  • Loading branch information
GregoryLundberg authored and jyrkive committed Aug 28, 2018
1 parent 14abecb commit 500c329
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/color.hpp
Expand Up @@ -250,7 +250,7 @@ namespace std
template<>
struct hash<color_t>
{
size_t operator()(const color_t& c) const
size_t operator()(const color_t& c) const noexcept
{
return c.to_rgba_bytes();
}
Expand Down
2 changes: 1 addition & 1 deletion src/map/location.hpp
Expand Up @@ -210,7 +210,7 @@ std::ostream &operator<<(std::ostream &s, const std::vector<map_location>& v);
namespace std {
template<>
struct hash<map_location> {
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;
Expand Down

0 comments on commit 500c329

Please sign in to comment.