From 4b0c6702bbb53dbecf3024003a8d79adbfe61607 Mon Sep 17 00:00:00 2001 From: Thibault Kruse Date: Mon, 28 Sep 2015 23:57:49 +0200 Subject: [PATCH] fix bad mix of tabs and spaces --- CppCoreGuidelines.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 85a2a67..55af8f2 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -11758,9 +11758,8 @@ If you define a destructor, you should not use the compiler-generated copy or mo // ... public: - ~X() { /* custom stuff, such as closing hnd */ } - - // suspicious: no mention of copying or moving -- what happens to hnd? + ~X() { /* custom stuff, such as closing hnd */ } + // suspicious: no mention of copying or moving -- what happens to hnd? }; X x1; @@ -11773,18 +11772,18 @@ If you define copying, and any base or member has a type that defines a move ope string s; // defines more efficient move operations // ... other data members ... public: - x(const x&) { /* stuff */ } - x& operator=(const x&) { /* stuff */ } + x(const x&) { /* stuff */ } + x& operator=(const x&) { /* stuff */ } - // BAD: failed to also define a move construction and move assignment - // (why wasn't the custom "stuff" repeated here?) - }; + // BAD: failed to also define a move construction and move assignment + // (why wasn't the custom "stuff" repeated here?) + }; x test() { x local; - // ... - return local; // pitfall: will be inefficient and/or do the wrong thing + // ... + return local; // pitfall: will be inefficient and/or do the wrong thing } If you define any of the copy constructor, copy assignment operator, or destructor, you probably should define the others.