ソースを参照

meta: redefined constructors where it matters (close #404)

Michele Caini 6 年 前
コミット
c5b8577d94
2 ファイル変更12 行追加3 行削除
  1. 1 1
      src/entt/meta/factory.hpp
  2. 11 2
      src/entt/meta/meta.hpp

+ 1 - 1
src/entt/meta/factory.hpp

@@ -362,7 +362,7 @@ public:
     }
 
 private:
-    entt::internal::meta_prop_node **curr{nullptr};
+    entt::internal::meta_prop_node **curr;
 };
 
 

+ 11 - 2
src/entt/meta/meta.hpp

@@ -327,7 +327,14 @@ class meta_any {
 
 public:
     /*! @brief Default constructor. */
-    meta_any() ENTT_NOEXCEPT = default;
+    meta_any() ENTT_NOEXCEPT
+        : storage{},
+          instance{},
+          node{},
+          destroy_fn{},
+          copy_fn{},
+          steal_fn{}
+    {}
 
     /**
      * @brief Constructs a meta any by directly initializing the new object.
@@ -616,7 +623,9 @@ private:
  */
 struct meta_handle {
     /*! @brief Default constructor. */
-    meta_handle() = default;
+    meta_handle()
+        : any{}
+    {}
 
     /**
      * @brief Creates an alias for the actual object.