瀏覽代碼

hashed_string: minor changes

Michele Caini 4 年之前
父節點
當前提交
49e702c0c7
共有 1 個文件被更改,包括 2 次插入2 次删除
  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>
 template<typename Char>
 [[nodiscard]] constexpr bool operator<=(const basic_hashed_string<Char> &lhs, const basic_hashed_string<Char> &rhs) ENTT_NOEXCEPT {
 [[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>
 template<typename Char>
 [[nodiscard]] constexpr bool operator>(const basic_hashed_string<Char> &lhs, const basic_hashed_string<Char> &rhs) ENTT_NOEXCEPT {
 [[nodiscard]] constexpr bool operator>(const basic_hashed_string<Char> &lhs, const basic_hashed_string<Char> &rhs) ENTT_NOEXCEPT {
-    return !(lhs <= rhs);
+    return rhs < lhs;
 }
 }
 
 
 /**
 /**