Procházet zdrojové kódy

sparse_set: extra (temporary) check

Michele Caini před 2 roky
rodič
revize
9c797ead28
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. 1 0
      src/entt/entity/sparse_set.hpp

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

@@ -237,6 +237,7 @@ protected:
      * @param len The length to use.
      * @param len The length to use.
      */
      */
     void swap_only_length_temporary_function(const std::size_t len) {
     void swap_only_length_temporary_function(const std::size_t len) {
+        ENTT_ASSERT(mode == deletion_policy::swap_only, "Deletion policy mismatched");
         head = static_cast<underlying_type>(len);
         head = static_cast<underlying_type>(len);
     }
     }