hashed_string: minor changes

This commit is contained in:
Michele Caini
2021-09-22 08:34:31 +02:00
parent c9c5214b3e
commit 49e702c0c7

View File

@@ -244,7 +244,7 @@ template<typename Char>
*/
template<typename Char>
[[nodiscard]] constexpr bool operator<=(const basic_hashed_string<Char> &lhs, const basic_hashed_string<Char> &rhs) ENTT_NOEXCEPT {
return lhs.value() <= rhs.value();
return !(rhs < lhs);
}
/**
@@ -257,7 +257,7 @@ template<typename Char>
*/
template<typename Char>
[[nodiscard]] constexpr bool operator>(const basic_hashed_string<Char> &lhs, const basic_hashed_string<Char> &rhs) ENTT_NOEXCEPT {
return !(lhs <= rhs);
return rhs < lhs;
}
/**