Skip to content

Commit d6ffbfd

Browse files
committed
missing semicolon
1 parent 3e1519b commit d6ffbfd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CppCoreGuidelines.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12171,7 +12171,7 @@ Not all member functions can be called.
1217112171
##### Example
1217212172

1217312173
class vector { // very simplified vector of doubles
12174-
// if elem!=nullptr then elem points to sz doubles
12174+
// if elem != nullptr then elem points to sz doubles
1217512175
public:
1217612176
vector() : elem{nullptr}, sz{0}{}
1217712177
vctor(int s) : elem{new double},sz{s} { /* initialize elements */ }
@@ -12182,7 +12182,7 @@ Not all member functions can be called.
1218212182
private:
1218312183
owner<double*> elem;
1218412184
int sz;
12185-
}
12185+
};
1218612186

1218712187
The class invariant - here stated as a comment - is established by the constructors.
1218812188
`new` throws if it cannot allocate the required memory.
@@ -12360,7 +12360,7 @@ That would be a leak.
1236012360
void leak(int x) // don't: may leak
1236112361
{
1236212362
auto p = new int{7};
12363-
if (x < 0) throw Get_me_out_of_here{} // may leak *p
12363+
if (x < 0) throw Get_me_out_of_here{}; // may leak *p
1236412364
// ...
1236512365
delete p; // we may never get here
1236612366
}

0 commit comments

Comments
 (0)