fix bad mix of tabs and spaces

This commit is contained in:
Thibault Kruse 2015-09-28 23:57:49 +02:00
parent 93736f8e41
commit 4b0c6702bb

View File

@ -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.