Michele Caini преди 1 година
родител
ревизия
b3e07785fc
променени са 1 файла, в които са добавени 5 реда и са изтрити 8 реда
  1. 5 8
      src/entt/meta/factory.hpp

+ 5 - 8
src/entt/meta/factory.hpp

@@ -84,17 +84,14 @@ class meta_factory {
 
 public:
     /*! @brief Default constructor. */
-    meta_factory() noexcept
-        : meta_factory{locator<meta_ctx>::value_or()} {}
+    meta_factory() noexcept = default;
 
     /**
      * @brief Context aware constructor.
      * @param area The context into which to construct meta types.
      */
     meta_factory(meta_ctx &area) noexcept
-        : ctx{&area},
-          bucket{},
-          info{&type_id<Type>()} {
+        : ctx{&area} {
         auto &&elem = internal::owner(*ctx, *info);
 
         if(!elem.details) {
@@ -444,9 +441,9 @@ public:
     }
 
 private:
-    meta_ctx *ctx;
-    dense_map<id_type, internal::meta_prop_node, identity> *bucket;
-    const type_info *info;
+    meta_ctx *ctx{&locator<meta_ctx>::value_or()};
+    dense_map<id_type, internal::meta_prop_node, identity> *bucket{};
+    const type_info *info{&type_id<Type>()};
 };
 
 /**