Browse Source

registry: rollback some no longer required changes

Michele Caini 3 years ago
parent
commit
ef91cd5375
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/entt/entity/registry.hpp

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

@@ -1109,8 +1109,7 @@ public:
     template<typename... Type>
     template<typename... Type>
     [[nodiscard]] auto try_get([[maybe_unused]] const entity_type entt) {
     [[nodiscard]] auto try_get([[maybe_unused]] const entity_type entt) {
         if constexpr(sizeof...(Type) == 1) {
         if constexpr(sizeof...(Type) == 1) {
-            auto &cpool = assure<std::remove_const_t<Type>...>();
-            return (static_cast<Type *>(cpool.contains(entt) ? std::addressof(cpool.get(entt)) : nullptr), ...);
+            return (const_cast<Type *>(std::as_const(*this).template try_get<Type>(entt)), ...);
         } else {
         } else {
             return std::make_tuple(try_get<Type>(entt)...);
             return std::make_tuple(try_get<Type>(entt)...);
         }
         }