Просмотр исходного кода

tombstone: zero-sized version support

Michele Caini 2 лет назад
Родитель
Сommit
463e8e0098
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/entt/entity/entity.hpp

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

@@ -314,7 +314,7 @@ struct tombstone_t {
     template<typename Entity>
     template<typename Entity>
     [[nodiscard]] constexpr bool operator==(const Entity entity) const noexcept {
     [[nodiscard]] constexpr bool operator==(const Entity entity) const noexcept {
         using traits_type = entt_traits<Entity>;
         using traits_type = entt_traits<Entity>;
-        return traits_type::to_version(entity) == traits_type::to_version(*this);
+        return traits_type::version_mask && (traits_type::to_version(entity) == traits_type::to_version(*this));
     }
     }
 
 
     /**
     /**