Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed May 15, 2019
1 parent c832888 commit 85152ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 0 additions & 2 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,3 @@
* multi component registry::remove and some others?
* move CONTRIBUTING.md within doc (for GitHub)
* reactive systems

* test snapshot for empty types
13 changes: 9 additions & 4 deletions docs/md/entity.md
Original file line number Diff line number Diff line change
Expand Up @@ -1464,15 +1464,20 @@ performance and memory usage. However, this also has consequences that are worth
mentioning.

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
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
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
for the ones that require to return actual instances.

Expand Down

0 comments on commit 85152ba

Please sign in to comment.