1
0
Michele Caini 7 жил өмнө
parent
commit
69c514d1a4
1 өөрчлөгдсөн 3 нэмэгдсэн , 2 устгасан
  1. 3 2
      docs/entity.md

+ 3 - 2
docs/entity.md

@@ -1242,12 +1242,13 @@ during iterations.<br/>
   components isn't allowed and can result in undefined behavior.
   components isn't allowed and can result in undefined behavior.
 
 
 In these cases, iterators aren't invalidated. To be clear, it doesn't mean that
 In these cases, iterators aren't invalidated. To be clear, it doesn't mean that
-also references will continue to be valid. Consider the following example:
+also references will continue to be valid.<br/>
+Consider the following example:
 
 
 ```cpp
 ```cpp
 registry.view<position>([&](auto entity, auto &pos) {
 registry.view<position>([&](auto entity, auto &pos) {
     registry.assign<position>(registry.create(), 0., 0.);
     registry.assign<position>(registry.create(), 0., 0.);
-    position.x = 0.; // warning: dangling pointer
+    pos.x = 0.; // warning: dangling pointer
 });
 });
 ```
 ```