1
0
Эх сурвалжийг харах

mixin: a comment for the future me

Michele Caini 1 жил өмнө
parent
commit
50d23e2413
2 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  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));
             }