Просмотр исходного кода

snapshot: use the right allocator for the remote-local mapping

Michele Caini 2 лет назад
Родитель
Сommit
3f1277f7bd
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      src/entt/entity/snapshot.hpp

+ 2 - 1
src/entt/entity/snapshot.hpp

@@ -390,7 +390,8 @@ public:
      * @param source A valid reference to a registry.
      * @param source A valid reference to a registry.
      */
      */
     basic_continuous_loader(registry_type &source) noexcept
     basic_continuous_loader(registry_type &source) noexcept
-        : reg{&source} {}
+        : remloc{source.get_allocator()},
+          reg{&source} {}
 
 
     /*! @brief Default move constructor. */
     /*! @brief Default move constructor. */
     basic_continuous_loader(basic_continuous_loader &&) = default;
     basic_continuous_loader(basic_continuous_loader &&) = default;