Fix error: missing noexcept
GCC 8.2.0 -Wnoexcept flags two functions which should be marked as not throwing.
This commit is contained in:
parent
c59ae5204a
commit
3826c263b1
2 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue