diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 179718c..08c5cb3 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -12889,7 +12889,7 @@ whereas `if (p != nullptr)` would be a long-winded workaround. This rule is especially useful when a declaration is used as a condition - if (auto pc = dynamic_cast(ps)) { ... } // execute is ps points to a kind of Circle, good + if (auto pc = dynamic_cast(ps)) { ... } // execute if ps points to a kind of Circle, good if (auto pc = dynamic_cast(ps); pc != nullptr) { ... } // not recommended