Browse Source

entity: the null entity works fine also with C++20 (close #467)

Michele Caini 6 years ago
parent
commit
692e5275a3
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/entt/entity/entity.hpp

+ 2 - 2
src/entt/entity/entity.hpp

@@ -141,13 +141,13 @@ public:
 
 template<typename Entity>
 constexpr bool operator==(const Entity entity, null other) ENTT_NOEXCEPT {
-    return other == entity;
+    return other.operator==(entity);
 }
 
 
 template<typename Entity>
 constexpr bool operator!=(const Entity entity, null other) ENTT_NOEXCEPT {
-    return other != entity;
+    return !(other == entity);
 }