Parcourir la source

sparse_set: reduce impact of entity_like, and prepare to fix it

skypjack il y a 1 jour
Parent
commit
05d11b7fa0
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 1 1
      src/entt/entity/fwd.hpp
  2. 1 1
      src/entt/entity/sparse_set.hpp

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

@@ -47,7 +47,7 @@ enum class deletion_policy : std::uint8_t {
 template<cvref_unqualified Type, typename Entity = entity>
 template<cvref_unqualified Type, typename Entity = entity>
 struct component_traits;
 struct component_traits;
 
 
-template<entity_like Entity = entity, typename = std::allocator<Entity>>
+template<typename Entity = entity, typename = std::allocator<Entity>>
 class basic_sparse_set;
 class basic_sparse_set;
 
 
 template<typename Type, typename = entity, typename = std::allocator<Type>>
 template<typename Type, typename = entity, typename = std::allocator<Type>>

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

@@ -136,7 +136,7 @@ private:
  * @tparam Entity A valid entity type.
  * @tparam Entity A valid entity type.
  * @tparam Allocator Type of allocator used to manage memory and elements.
  * @tparam Allocator Type of allocator used to manage memory and elements.
  */
  */
-template<entity_like Entity, typename Allocator>
+template<typename Entity, typename Allocator>
 class basic_sparse_set {
 class basic_sparse_set {
     using alloc_traits = std::allocator_traits<Allocator>;
     using alloc_traits = std::allocator_traits<Allocator>;
     static_assert(std::is_same_v<typename alloc_traits::value_type, Entity>, "Invalid value type");
     static_assert(std::is_same_v<typename alloc_traits::value_type, Entity>, "Invalid value type");