Explorar el Código

any: drop useless remove_const_t

Michele Caini hace 3 años
padre
commit
fa48c76dd1
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/entt/core/any.hpp

+ 2 - 2
src/entt/core/any.hpp

@@ -463,7 +463,7 @@ Type any_cast(basic_any<Len, Align> &&data) noexcept {
 /*! @copydoc any_cast */
 template<typename Type, std::size_t Len, std::size_t Align>
 const Type *any_cast(const basic_any<Len, Align> *data) noexcept {
-    const auto &info = type_id<std::remove_cv_t<std::remove_reference_t<Type>>>();
+    const auto &info = type_id<std::remove_cv_t<Type>>();
     return static_cast<const Type *>(data->data(info));
 }
 
@@ -474,7 +474,7 @@ Type *any_cast(basic_any<Len, Align> *data) noexcept {
         // last attempt to make wrappers for const references return their values
         return any_cast<Type>(&std::as_const(*data));
     } else {
-        const auto &info = type_id<std::remove_cv_t<std::remove_reference_t<Type>>>();
+        const auto &info = type_id<std::remove_cv_t<Type>>();
         return static_cast<Type *>(data->data(info));
     }
 }