Browse Source

meta: cleanup (we know it's non-const already)

Michele Caini 1 year ago
parent
commit
c8000f3e87
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/entt/meta/meta.hpp

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

@@ -448,7 +448,7 @@ public:
         if constexpr(std::is_const_v<Type>) {
         if constexpr(std::is_const_v<Type>) {
             return std::as_const(*this).try_cast<std::remove_const_t<Type>>();
             return std::as_const(*this).try_cast<std::remove_const_t<Type>>();
         } else {
         } else {
-            const auto &other = type_id<std::remove_cv_t<Type>>();
+            const auto &other = type_id<Type>();
             return static_cast<Type *>(const_cast<void *>(internal::try_cast(internal::meta_context::from(*ctx), node, other, storage.data())));
             return static_cast<Type *>(const_cast<void *>(internal::try_cast(internal::meta_context::from(*ctx), node, other, storage.data())));
         }
         }
     }
     }