Răsfoiți Sursa

hashed_string: minor changes

Michele Caini 4 ani în urmă
părinte
comite
49e702c0c7
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      src/entt/core/hashed_string.hpp

+ 2 - 2
src/entt/core/hashed_string.hpp

@@ -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;
 }
 
 /**