Explorar o código

mixin: a comment for the future me

Michele Caini hai 1 ano
pai
achega
50d23e2413
Modificáronse 2 ficheiros con 1 adicións e 1 borrados
  1. 0 1
      TODO
  2. 1 0
      src/entt/entity/mixin.hpp

+ 0 - 1
TODO

@@ -38,4 +38,3 @@ TODO:
 * sparse_set shrink_to_fit argument for sparse array shrink policy (none, empty, deep, whatever)
 * any cdynamic to support const ownership construction
 * return meta context from meta objects
-* review sigh_mixin::insert, maybe bugged (ie with pointer stability enabled)

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

@@ -374,6 +374,7 @@ public:
         underlying_type::insert(first, last, std::forward<Args>(args)...);
 
         if(auto &reg = owner_or_assert(); !construction.empty()) {
+            // fine as long as insert passes force_back true to try_emplace
             for(const auto to = underlying_type::size(); from != to; ++from) {
                 construction.publish(reg, underlying_type::operator[](from));
             }