Skip to content

Commit 29ece6e

Browse files
committed
doc: review faq.md
1 parent d3d4708 commit 29ece6e

1 file changed

Lines changed: 15 additions & 17 deletions

File tree

‎docs/md/faq.md‎

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ part of the documentation.
3232
latest revision of the language and the standard library. For this reason, it is
3333
likely that some classes you are working with are using standard containers
3434
under the hood.<br/>
35-
Unfortunately, it is known that the standard containers are not particularly
36-
performing in debugging (the reasons for this go beyond this document) and are
37-
even less so on Windows, apparently. Fortunately, this can also be mitigated a
38-
lot, achieving good results in many cases.
35+
Standard containers are known to perform poorly in debug builds (the reasons are
36+
beyond the scope of this document), especially on Windows. Fortunately, this can
37+
often be mitigated, with good results in many cases.
3938

4039
First of all, there are two things to do in a Windows project:
4140

@@ -62,15 +61,15 @@ preferably `O1`.
6261
6362
## How can I represent hierarchies with my components?
6463
65-
This is one of the first questions that anyone makes when starting to work with
66-
the entity-component-system architectural pattern.<br/>
64+
This is one of the first questions people ask when they start working with the
65+
entity-component-system architectural pattern.<br/>
6766
There are several approaches to the problem, and the best one depends mainly on
68-
the real problem one is facing. In all cases, how to do it does not strictly
69-
depend on the library in use, but the latter certainly allows or not different
70-
techniques depending on how the data are laid out.
67+
the specific problem. In all cases, the approach does not strictly depend on the
68+
library in use, but it may allow or prevent different techniques depending on
69+
how the data is laid out.
7170
72-
I tried to describe some of the approaches that fit well with the model of
73-
`EnTT`. [This](https://skypjack.github.io/2019-06-25-ecs-baf-part-4/) is the
71+
I tried to describe some approaches that fit well with the `EnTT` model.
72+
[This](https://skypjack.github.io/2019-06-25-ecs-baf-part-4/) is the
7473
first post of a series that tries to _explore_ the problem. More will probably
7574
come in the future.<br/>
7675
In addition, `EnTT` also offers the possibility to create stable storage types
@@ -90,7 +89,7 @@ Custom entity identifiers are definitely a good idea in two cases at least:
9089
9190
Identifiers can be defined through enum classes and class types that define an
9291
`entity_type` member of type `std::uint32_t` or `std::uint64_t`.<br/>
93-
In fact, this is a definition equivalent to that of `entt::entity`:
92+
In fact, this definition is equivalent to that of `entt::entity`:
9493
9594
```cpp
9695
enum class entity: std::uint32_t {};
@@ -176,11 +175,10 @@ If this is not clear, below you can find a _vademecum_ for this purpose:
176175
Among the most controversial functions can be found `emplace_or_replace` and
177176
`destroy`. However, following the above rules, it is quite simple to know what
178177
will happen.<br/>
179-
In the first case, `on_created` is invoked if the entity has not the component,
180-
otherwise the latter is replaced and therefore `on_update` is triggered. As for
181-
the second case, components are removed from their entities and thus freed when
182-
they are recycled. It means that `on_destroyed` is triggered for every component
183-
owned by the entity that is destroyed.
178+
For `emplace_or_replace`, `on_created` is invoked if the entity lacks the
179+
component. Otherwise, it is replaced and `on_update` is triggered.<br/>
180+
Destroying an entity removes its components and triggers `on_destroyed` for
181+
each of them.
184182

185183
## Duplicate storage for the same component
186184

0 commit comments

Comments
 (0)