doc: minor changes

This commit is contained in:
Michele Caini
2020-09-24 08:44:41 +02:00
parent 81311ddd03
commit 5ac76d29fc
3 changed files with 4 additions and 4 deletions

View File

@@ -140,7 +140,7 @@ constexpr auto str = "text"_hs;
Finally, in case users need to create hashed strings at runtime, this class also
offers the necessary functionalities:
```
```cpp
std::string orig{"text"};
// create a full-featured hashed string...
@@ -219,7 +219,7 @@ otherwise.
A type info object is an opaque class that is also copy and move constructible.
This class is returned by the `type_id` function template:
```
```cpp
// generates an info object from a type ...
auto info = entt::type_id<a_type>();

View File

@@ -848,7 +848,7 @@ even though it requires users to set up their own stamping functions.
The best bet here is probably to define a reflection system or a mapping between
the type identifiers and their opaque functions for stamping. As an example:
```
```cpp
template<typename Type>
void stamp(const entt::registry &from, const entt::entity src, entt::registry &to, const entt::entity dst) {
to.emplace_or_replace<Type>(dst, from.get<Type>(src));

View File

@@ -149,7 +149,7 @@ If they are not, the first argument of the function type must be that of the
class on which the members operate and an instance of this class must obviously
be passed when invoking the delegate:
```
```cpp
entt::delegate<void(my_struct &, int)> delegate;
delegate.connect<&my_struct::f>();