Pārlūkot izejas kodu

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

Michele Caini 6 gadi atpakaļ
vecāks
revīzija
c5b8577d94
2 mainītis faili ar 12 papildinājumiem un 3 dzēšanām
  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:
 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:
 public:
     /*! @brief Default constructor. */
     /*! @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.
      * @brief Constructs a meta any by directly initializing the new object.
@@ -616,7 +623,9 @@ private:
  */
  */
 struct meta_handle {
 struct meta_handle {
     /*! @brief Default constructor. */
     /*! @brief Default constructor. */
-    meta_handle() = default;
+    meta_handle()
+        : any{}
+    {}
 
 
     /**
     /**
      * @brief Creates an alias for the actual object.
      * @brief Creates an alias for the actual object.