Преглед изворни кода

doc: update to reflect last changes (close #1061)

Michele Caini пре 2 година
родитељ
комит
104fb0f06c
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      docs/md/entity.md

+ 4 - 1
docs/md/entity.md

@@ -1817,7 +1817,10 @@ However, it's possible to _enforce_ iteration of a view by given component order
 by means of the `use` function:
 
 ```cpp
-for(auto entity : registry.view<position, velocity>().use<position>()) {
+auto view = registry.view<position, velocity>();
+view.use<position>();
+
+for(auto entity: view) {
     // ...
 }
 ```