From 9a703fa02b1540394736b4b78ce396573258803f Mon Sep 17 00:00:00 2001 From: Amir Livneh Date: Thu, 7 Mar 2019 14:36:49 -0500 Subject: [PATCH] Don't reuse variable name in ES.50 example (#1348) Reusing the name 'i' violates ES.12 and distracts from the point of the example. --- CppCoreGuidelines.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 73a652a..a56c2b3 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -11715,9 +11715,9 @@ If the variable is actually declared `const`, the result of "casting away `const ##### Example, bad - void f(const int& i) + void f(const int& x) { - const_cast(i) = 42; // BAD + const_cast(x) = 42; // BAD } static int i = 0;