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

sparse_set: refine ::contiguous to work fine with upcoming changes

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

+ 1 - 1
src/entt/entity/sparse_set.hpp

@@ -530,7 +530,7 @@ public:
      * @return True if the sparse set is fully packed, false otherwise.
      * @return True if the sparse set is fully packed, false otherwise.
      */
      */
     [[nodiscard]] bool contiguous() const noexcept {
     [[nodiscard]] bool contiguous() const noexcept {
-        return (free_list == null);
+        return (mode != deletion_policy::in_place) || (free_list == null);
     }
     }
 
 
     /**
     /**