소스 검색

meta: refine meta_any move ctor

skypjack 10 달 전
부모
커밋
1a02b6ad57
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      src/entt/meta/meta.hpp

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

@@ -323,7 +323,11 @@ public:
      * @param other The instance to move from.
      */
     meta_any(meta_any &&other) noexcept
-        : meta_any{*other.ctx, std::move(other)} {}
+        : storage{std::move(other.storage)},
+          ctx{other.ctx},
+          resolve{std::exchange(other.resolve, nullptr)},
+          node{std::exchange(other.node, nullptr)},
+          vtable{std::exchange(other.vtable, nullptr)} {}
 
     /**
      * @brief Copy assignment operator.