doc: fixed typos

This commit is contained in:
Michele Caini
2022-10-25 14:50:18 +02:00
parent fb14d26015
commit f06852b5c2

View File

@@ -144,12 +144,12 @@ entt::resource_cache<my_resource, my_loader> cache{};
Under the hood, a cache is nothing more than a map where the key value has type
`entt::id_type` while the mapped value is whatever type its loader returns.<br/>
For this reason, it offers most of the functionality a user would expect from a
map, such as `empty` or `size` and so on. Similarly, it's an iterable type that
also supports indexing by resource id:
For this reason, it offers most of the functionalities a user would expect from
a map, such as `empty` or `size` and so on. Similarly, it's an iterable type
that also supports indexing by resource id:
```cpp
for(entt::resource<my_resource> curr: cache) {
for(auto [id, res]: cache) {
// ...
}
@@ -175,7 +175,7 @@ auto ret = cache.load("resource/id"_hs);
const bool loaded = ret.second;
// takes the resource handle pointed to by the returned iterator
entt::resource<my_resource> res = *ret.first;
entt::resource<my_resource> res = ret.first->second;
```
Note that the hashed string is used for convenience in the example above.<br/>