Michele Caini 6 tahun lalu
induk
melakukan
85152bac34
2 mengubah file dengan 9 tambahan dan 6 penghapusan
  1. 0 2
      TODO
  2. 9 4
      docs/md/entity.md

+ 0 - 2
TODO

@@ -26,5 +26,3 @@
 * multi component registry::remove and some others?
 * multi component registry::remove and some others?
 * move CONTRIBUTING.md within doc (for GitHub)
 * move CONTRIBUTING.md within doc (for GitHub)
 * reactive systems
 * reactive systems
-
-* test snapshot for empty types

+ 9 - 4
docs/md/entity.md

@@ -1464,15 +1464,20 @@ performance and memory usage. However, this also has consequences that are worth
 mentioning.
 mentioning.
 
 
 When an empty type is detected, it's not instantiated in any case. Therefore,
 When an empty type is detected, it's not instantiated in any case. Therefore,
-only the entities to which it's assigned are made availble. All the iterators as
-well as the `get` member functions of registries, views and groups will return
-temporary objects. Similarly, some functions such as `try_get` or the raw access
-to the list of components aren't available for this kind of types.<br/>
+only the entities to which it's assigned are made available. All the iterators
+as well as the `get` member functions of the registry, the views and the groups
+will return temporary objects. Similarly, some functions such as `try_get` or
+the raw access to the list of components aren't available for this kind of
+types.<br/>
 On the other hand, iterations are faster because only the entities to which the
 On the other hand, iterations are faster because only the entities to which the
 type is assigned are considered. Moreover, less memory is used, since there
 type is assigned are considered. Moreover, less memory is used, since there
 doesn't exist any instance of the component, no matter how many entities it is
 doesn't exist any instance of the component, no matter how many entities it is
 assigned to.
 assigned to.
 
 
+For similar reasons, wherever a function type of a listener accepts a component,
+it cannot be caught by a non-const reference. Capture it by copy or by const
+reference instead.
+
 More in general, none of the features offered by the library is affected, but
 More in general, none of the features offered by the library is affected, but
 for the ones that require to return actual instances.
 for the ones that require to return actual instances.