Răsfoiți Sursa

registry: make ::storage<T> return type explicit

Michele Caini 3 ani în urmă
părinte
comite
4d57d5c327
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      src/entt/entity/registry.hpp

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

@@ -428,7 +428,7 @@ public:
      * @return The storage for the given component type.
      */
     template<typename Type>
-    decltype(auto) storage(const id_type id = type_hash<Type>::value()) {
+    storage_for_type<Type> &storage(const id_type id = type_hash<Type>::value()) {
         return assure<Type>(id);
     }
 
@@ -444,7 +444,7 @@ public:
      * @return The storage for the given component type.
      */
     template<typename Type>
-    decltype(auto) storage(const id_type id = type_hash<Type>::value()) const {
+    const storage_for_type<Type> &storage(const id_type id = type_hash<Type>::value()) const {
         return assure<Type>(id);
     }