Browse Source

fixed typo

Michele Caini 7 years ago
parent
commit
7bac69f360
1 changed files with 2 additions and 2 deletions
  1. 2 2
      docs/md/entity.md

+ 2 - 2
docs/md/entity.md

@@ -851,8 +851,8 @@ registry.set<my_type>(42, 'c');
 const auto &var = registry.ctx<my_type>();
 
 // if in doubts, probe the registry to avoid assertions in case of errors
-if(auto *ptr = registry.try_ctx<my_type>(); var) {
-    // uses the context variable associated with a registry, if any
+if(auto *ptr = registry.try_ctx<my_type>(); ptr) {
+    // uses the context variable associated with the registry, if any
 }
 
 // unsets the context variable