Skip to content

Commit c0bff45

Browse files
committed
style fixes
1 parent 8f8c232 commit c0bff45

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CppCoreGuidelines.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5464,7 +5464,7 @@ The compiler is more likely to get the default semantics right and you cannot im
54645464
Tracer& operator=(Tracer&&) = default;
54655465
};
54665466

5467-
Because we defined the destructor, we must define the copy and move operations. The `=default` is the best and simplest way of doing that.
5467+
Because we defined the destructor, we must define the copy and move operations. The `= default` is the best and simplest way of doing that.
54685468

54695469
##### Example, bad
54705470

@@ -7484,7 +7484,7 @@ The default is the easiest to read and write.
74847484

74857485
enum class Direction : char { n, s, e, w,
74867486
ne, nw, se, sw }; // underlying type saves space
7487-
7487+
74887488
enum class Web_color : int { red = 0xFF0000,
74897489
green = 0x00FF00,
74907490
blue = 0x0000FF }; // underlying type is redundant
@@ -12180,10 +12180,10 @@ Not all member functions can be called.
1218012180
##### Example
1218112181

1218212182
class Vector { // very simplified vector of doubles
12183-
// if elem!=nullptr then elem points to sz doubles
12183+
// if elem != nullptr then elem points to sz doubles
1218412184
public:
1218512185
Vector() : elem{nullptr}, sz{0}{}
12186-
vector(int s) : elem{new double},sz{s} { /* initialize elements */ }
12186+
vector(int s) : elem{new double}, sz{s} { /* initialize elements */ }
1218712187
~Vector() { delete elem; }
1218812188
double& operator[](int s) { return elem[s]; }
1218912189
// ...

0 commit comments

Comments
 (0)