Przeglądaj źródła

minor changes: shadow variables, dead doc, todo list

Michele Caini 6 lat temu
rodzic
commit
30a039a031
2 zmienionych plików z 3 dodań i 11 usunięć
  1. 1 2
      TODO
  2. 2 9
      src/entt/entity/registry.hpp

+ 1 - 2
TODO

@@ -17,10 +17,9 @@
 * stomp -> merge (naming is hard as heck, it's known thing)
 * observer: user defined filters (eg .replace<T, &function> or .group<T, U, &func>)
 * any-of rule for views/groups (eg entity has A and any of B/C/D)
-* sparse set: there exists an alternative to paginated sparse arrays?
+  - get -> all, exclude -> none
 * see warning (vs2017 only): d:\a\entt\entt\src\entt\entity\registry.hpp(108)
 * remove duktape example (and eventually provide a new one)?
-* meta: rebind meta types from any across boundaries (eg conv corner case across boundary)
 * review and suppress warnings, if any
 * extract only the type within type_info, hash its name (more portable)
 * registry

+ 2 - 9
src/entt/entity/registry.hpp

@@ -1511,13 +1511,6 @@ public:
      * lists. An excluded type will never be copied.
      *
      * @warning
-     * Stomping entities between registries with different types of identifiers
-     * without a component list is allowed only if the target registry already
-     * contains the required pools.<br/>
-     * An assertion will abort the execution at runtime in debug mode in case a
-     * pool is missing.
-     *
-     * @warning
      * Attempting to copy components that aren't copyable results in unexpected
      * behaviors.<br/>
      * A static assertion will abort the compilation when the components
@@ -1594,7 +1587,7 @@ public:
     basic_snapshot_loader<Entity> loader() {
         using force_fn_type = void(basic_registry &, const entity_type, const bool);
 
-        force_fn_type *force = [](basic_registry &reg, const entity_type entity, const bool discard) {
+        force_fn_type *force = [](basic_registry &reg, const entity_type entity, const bool drop) {
             const auto entt = to_integral(entity) & traits_type::entity_mask;
             auto &others = reg.entities;
 
@@ -1609,7 +1602,7 @@ public:
 
             others[entt] = entity;
 
-            if(discard) {
+            if(drop) {
                 reg.destroy(entity);
                 const auto version = to_integral(entity) & (traits_type::version_mask << traits_type::entity_shift);
                 others[entt] = entity_type{(to_integral(others[entt]) & traits_type::entity_mask) | version};