From 9bae6e67bcb7074291d4b37cc760b8884afc224e Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Thu, 11 May 2023 14:23:15 +0200 Subject: [PATCH] doc: update connection helper doc --- docs/md/entity.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/md/entity.md b/docs/md/entity.md index 47d459828..ace9edca9 100644 --- a/docs/md/entity.md +++ b/docs/md/entity.md @@ -714,12 +714,15 @@ entt::sigh_helper{registry} .with() .on_construct<&a_listener>() .on_destroy<&another_listener>() - .with() + .with("other"_hs) .on_update(); ``` -Obviously, it doesn't make the code disappear but it should at least reduce it -in the most complex cases. +Runtime pools are also supported by providing an identifier when calling `with`, +as shown in the previous snippet. Refer to the following sections for more +information about runtime pools.
+Obviously, this helper doesn't make the code disappear but it should at least +reduce the boilerplate in the most complex cases. ### Handle @@ -1294,7 +1297,7 @@ This means that the _name_ used to retrieve this kind of storage is ignored and the registry will only ever return the same element to the caller. For example: ```cpp -auto &other = registry.storage("custom"_hs); +auto &other = registry.storage("other"_hs); ``` In this case, the identifier is discarded as is. The call is in all respects