Przeglądaj źródła

meta: minor changes

Michele Caini 1 rok temu
rodzic
commit
991b5176da
1 zmienionych plików z 6 dodań i 3 usunięć
  1. 6 3
      src/entt/meta/meta.hpp

+ 6 - 3
src/entt/meta/meta.hpp

@@ -209,9 +209,12 @@ class meta_any {
 
     meta_any(const meta_any &other, any ref) noexcept
         : storage{std::move(ref)},
-          ctx{other.ctx},
-          node{storage ? other.node : internal::meta_type_node{}},
-          vtable{storage ? other.vtable : &basic_vtable<void>} {}
+          ctx{other.ctx} {
+        if(storage) {
+            node = other.node;
+            vtable = other.vtable;
+        }
+    }
 
 public:
     /*! Default constructor. */