소스 검색

fixed typo

Michele Caini 7 년 전
부모
커밋
7bac69f360
1개의 변경된 파일과 2개의 추가작업 그리고 2개의 파일을 삭제
  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