Browse Source

registry: minor changes

Michele Caini 4 years ago
parent
commit
24b7e998b2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/entt/entity/registry.hpp

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

@@ -891,7 +891,7 @@ public:
 
 
         if constexpr(sizeof...(Component) == 1) {
         if constexpr(sizeof...(Component) == 1) {
             const auto *cpool = pool_if_exists<std::remove_const_t<Component>...>();
             const auto *cpool = pool_if_exists<std::remove_const_t<Component>...>();
-            return (cpool && cpool->contains(entity)) ? &cpool->get(entity) : nullptr;
+            return (cpool && cpool->contains(entity)) ? std::addressof(cpool->get(entity)) : nullptr;
         } else {
         } else {
             return std::make_tuple(try_get<Component>(entity)...);
             return std::make_tuple(try_get<Component>(entity)...);
         }
         }