Преглед изворни кода

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

Michele Caini пре 2 година
родитељ
комит
4d57d5c327
1 измењених фајлова са 2 додато и 2 уклоњено
  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);
     }