소스 검색

handle: minor changes

Michele Caini 5 년 전
부모
커밋
8259371d6a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/entt/entity/handle.hpp

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

@@ -27,7 +27,7 @@ struct basic_handle {
     /*! @brief Underlying entity identifier. */
     /*! @brief Underlying entity identifier. */
     using entity_type = std::remove_const_t<Entity>;
     using entity_type = std::remove_const_t<Entity>;
     /*! @brief Type of registry accepted by the handle. */
     /*! @brief Type of registry accepted by the handle. */
-    using registry_type = std::conditional_t<std::is_const_v<Entity>, const basic_registry<entity_type>, basic_registry<entity_type>>;
+    using registry_type = constness_as_t<basic_registry<entity_type>, Entity>;
 
 
     /*! @brief Constructs an invalid handle. */
     /*! @brief Constructs an invalid handle. */
     basic_handle() ENTT_NOEXCEPT
     basic_handle() ENTT_NOEXCEPT