From abad34355787ea76bb02fd9e9949d6d3acec4c4e Mon Sep 17 00:00:00 2001 From: Amir Livneh Date: Wed, 20 Feb 2019 18:11:53 -0500 Subject: [PATCH] Fix indentation in example (#1339) --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 047ce07..d91e824 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -9789,7 +9789,7 @@ The following should not pass code review: f(*g_p); // BAD: same reason, just passing it as a "this" pointer - g_p->func(); + g_p->func(); } The fix is simple -- take a local copy of the pointer to "keep a ref count" for your call tree: