Skip to content

Commit c99a366

Browse files
committed
travis CI fixes
1 parent 4f9a6c8 commit c99a366

File tree

2 files changed

+39
-26
lines changed

2 files changed

+39
-26
lines changed

CppCoreGuidelines.md

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ Better:
589589

590590
Now, there is no explicit mention of the iteration mechanism, and the loop operates on a reference to `const` elements so that accidental modification cannot happen. If modification is desired, say so:
591591

592-
for (auto& x : v) { /* do to with x */ }
592+
for (auto& x : v) { /* modify x */ }
593593

594594
Sometimes better still, use a named algorithm:
595595

@@ -4048,17 +4048,17 @@ For example:
40484048
##### Note
40494049

40504050
If the set of direct users of a set of variables cannot be easily determined, the type or usage of that set cannot be (easily) changed/improved.
4051-
For `public`and `protected` data, that's usually the case.
4051+
For `public` and `protected` data, that's usually the case.
40524052

40534053
##### Example
40544054

40554055
A class can provide two interfaces to its users.
40564056
One for derived classes (`protected`) and one for general users (`public`).
4057-
For example, a derived class might be allowed to skip a run-time check because it has already guarenteed correctness:
4057+
For example, a derived class might be allowed to skip a run-time check because it has already guaranteed correctness:
40584058

40594059
class Foo {
40604060
public:
4061-
int bar(int x) { check(x); return do_bar(); }
4061+
int bar(int x) { check(x); return do_bar(); }
40624062
// ...
40634063
protected:
40644064
int do_bar(int x); // do some operation on the data
@@ -4069,12 +4069,16 @@ For example, a derived class might be allowed to skip a run-time check because i
40694069

40704070
class Dir : public Foo {
40714071
//...
4072-
int mem(int x, int y) { /* ... do something ... */ rteurn do_bar(x+y); } // OK: derived class can bypass check
4072+
int mem(int x, int y)
4073+
{
4074+
/* ... do something ... */
4075+
return do_bar(x+y); // OK: derived class can bypass check
4076+
}
40734077
}
40744078

40754079
void user(Foo& x)
40764080
{
4077-
int r1 = x.bar(1); // OK, will check
4081+
int r1 = x.bar(1); // OK, will check
40784082
int r2 = x.do_bar(2); // error: would bypass check
40794083
// ...
40804084
}
@@ -6817,14 +6821,14 @@ This kind of "vector" isn't meant to be used as a base class at all.
68176821
Style st;
68186822
};
68196823

6820-
Now it is up to every defived `Shape` to manipulate the protected data correctly.
6824+
Now it is up to every derived `Shape` to manipulate the protected data correctly.
68216825
This has been popular, but also a major source of maintenance problems.
68226826
In a large class hierarchy, the consistent use of protected data is hard to maintain because there can be a lot of code,
68236827
spread over a lot of classes.
68246828
The set of classes that can touch that data is open: anyone can derive a new class and start manipulating the protected data.
68256829
Often, it is not possible to examine the complete set of classes so any change to the representation of the class becomes infeasible.
68266830
There is no enforced invariant for the protected data; it is much like a set of global variables.
6827-
The protected data has de-factor become global to a large body of code.
6831+
The protected data has de facto become global to a large body of code.
68286832

68296833
##### Note
68306834

@@ -6960,18 +6964,18 @@ or various bases from boost.intrusive (e.g. `list_base_hook` or `intrusive_ref_c
69606964
};
69616965

69626966
class Derive1 : public Interface, virtual protected Utility {
6963-
// overrride Iterface functions
6967+
// override Interface functions
69646968
// Maybe override Utility virtual functions
69656969
// ...
69666970
};
69676971

69686972
class Derive2 : public Interface, virtual protected Utility {
6969-
// overrride Iterface functions
6973+
// override Interface functions
69706974
// Maybe override Utility virtual functions
69716975
// ...
69726976
};
69736977

6974-
Factoring out `Utility` makes sense if many derived classes share significent "implementation details."
6978+
Factoring out `Utility` makes sense if many derived classes share significant "implementation details."
69756979

69766980

69776981
##### Note
@@ -6982,7 +6986,7 @@ and `Utility` is the root of an [implementation hierarchy](Rh-kind).
69826986

69836987
##### Note
69846988

6985-
Often, lineraization of a hierarchy is a better solution.
6989+
Often, linearization of a hierarchy is a better solution.
69866990

69876991
##### Enforcement
69886992

@@ -14511,28 +14515,28 @@ Exception specifications make error handling brittle, impose a run-time cost, an
1451114515
##### Example
1451214516

1451314517
int use(int arg)
14514-
throw(X,Y)
14518+
throw(X, Y)
1451514519
{
1451614520
// ...
1451714521
auto x = f(arg);
1451814522
// ...
1451914523
}
1452014524

14521-
if 'f()' throws an exception different from `X` and `Y` the unexpected handler is invoked, which by default terminates.
14525+
if `f()` throws an exception different from `X` and `Y` the unexpected handler is invoked, which by default terminates.
1452214526
That's OK, but say that we have checked that this cannot happen and `f` is changed to throw a new exception `Z`,
1452314527
we now have a crash on our hands unless we change `use()` (and re-test everything).
1452414528
The snag is that `f()` may be in a library we do not control and the new exception is not anything that `use()` can do
1452514529
anything about or is in any way interested in.
1452614530
We can change `use()` to pass `Z` through, but now `use()`'s callers probably needs to be modified.
1452714531
This quickly becomes unmanageable.
14528-
Alternatively, we can add a `try`-`catch` to `use()` to map `Z` into an acceptable excption.
14532+
Alternatively, we can add a `try`-`catch` to `use()` to map `Z` into an acceptable exception.
1452914533
This too, quickly becomes unmanageable.
1453014534
Note that changes to the set of exceptions often happens at the lowest level of a system
14531-
(e.g., because of changes to a network library or some middleware), so changes "bubble up" through long call chains.
14535+
(e.g., because of changes to a network library or some middleware), so changes "bubble up" through long call chains.
1453214536
In a large code base, this could mean that nobody could update to a new version of a library until the last user was modified.
14533-
If `use()` is part of a library, it may not be possible to update it bacause a change could affect unknow clients.
14537+
If `use()` is part of a library, it may not be possible to update it because a change could affect unknown clients.
1453414538

14535-
The policy of letting exceptions propogate until they reach a function that potentially can handle it has proven itself over the years.
14539+
The policy of letting exceptions propagate until they reach a function that potentially can handle it has proven itself over the years.
1453614540

1453714541
##### Note
1453814542

@@ -14541,7 +14545,7 @@ For example, see [Stroustrup94](#Stroustrup94).
1454114545

1454214546
##### Note
1454314547

14544-
If no exception may be throwh, use [`noexcept`(#Re-noexcept)]
14548+
If no exception may be thrown, use [`noexcept`](#Re-noexcept)
1454514549

1454614550
##### Enforcement
1454714551

@@ -17387,7 +17391,7 @@ It is more likely to be stable, well-maintained, and widely available than your
1738717391
##### Reason
1738817392

1738917393
Adding to `std` may change the meaning of otherwise standards conforming code.
17390-
Additions to `std` may clash with furture versions of the standard.
17394+
Additions to `std` may clash with future versions of the standard.
1739117395

1739217396
##### Example
1739317397

@@ -17752,7 +17756,7 @@ Iostream rule summary:
1775217756
##### Reason
1775317757

1775417758
Unless you genuinely just deal with individual characters, using character-level input leads to the user code performing potentially error-prone
17755-
and potentially inefficient compusition ot tokens out of characters.
17759+
and potentially inefficient composition of tokens out of characters.
1775617760

1775717761
##### Example
1775817762

@@ -17767,7 +17771,7 @@ and potentially inefficient compusition ot tokens out of characters.
1776717771

1776817772
##### Reason
1776917773

17770-
`iosteam`s are safe, flexible, and extensible.
17774+
`iostream`s are safe, flexible, and extensible.
1777117775

1777217776
##### Example
1777317777

@@ -17856,7 +17860,7 @@ a `longjmp` ignores destructors, thus invalidating all resource-management strat
1785617860

1785717861
##### Enforcement
1785817862

17859-
Flag all occurences of `longjmp`and `setjmp`
17863+
Flag all occurrences of `longjmp`and `setjmp`
1786017864

1786117865

1786217866

@@ -19480,9 +19484,9 @@ Use literal suffixes where clarification is needed
1948019484

1948119485
###### Note
1948219486

19483-
Literals should not be springled all over the code as ["magic constants'](#Res-magic),
19487+
Literals should not be sprinkled all over the code as ["magic constants"](#Res-magic),
1948419488
but it is still a good idea to make them readable where they are defined.
19485-
It is easy to make a yypo in a long string of integers.
19489+
It is easy to make a typo in a long string of integers.
1948619490

1948719491
###### Enforcement
1948819492

@@ -20639,7 +20643,7 @@ Alternatively, we will decide that no change is needed and delete the entry.
2063920643
\[Meyers15]: S. Meyers. Effective Modern C++ (O'Reilly, 2015).
2064020644
* <a name="Murray93"></a>
2064120645
\[Murray93]: R. Murray. C++ Strategies and Tactics (Addison-Wesley, 1993).
20642-
* <a name="Stroustrup94"></a>
20646+
* <a name="Stroustrup94"></a>
2064320647
\[Stroustrup94]: B. Stroustrup. The Design and Evolution of C++ (Addison-Wesley, 1994).
2064420648
* <a name="Stroustrup00"></a>
2064520649
\[Stroustrup00]: B. Stroustrup. The C++ Programming Language (Special 3rdEdition) (Addison-Wesley, 2000).

scripts/hunspell/isocpp.dic

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,17 @@ int32
225225
int64
226226
ints
227227
io
228+
ios
228229
iostream
229230
Iostream
231+
iostreams
230232
iso
231233
isocpp
232234
ISORC
233235
istream
234236
Iter
235237
Jiangang
238+
jmp
236239
join's
237240
JSF
238241
Juhl
@@ -244,9 +247,11 @@ Lakos96
244247
Lavavej
245248
LCSD05
246249
lifecycle
250+
linearization
247251
llvm
248252
lockfree
249253
Lomow
254+
longjmp
250255
LSP
251256
lst
252257
lvalue
@@ -278,6 +283,7 @@ Meyers15
278283
Meyers96
279284
Meyers97
280285
microbenchmarks
286+
middleware
281287
mixin
282288
mixins
283289
modify1
@@ -381,6 +387,7 @@ r2
381387
raii
382388
RAII
383389
Rc
390+
Rclib
384391
rcon
385392
Rcon
386393
Rconc
@@ -437,6 +444,7 @@ SFINAE
437444
sharedness
438445
sharedptrparam
439446
'sharedptrparam'
447+
setjmp
440448
SignedIntegral
441449
simpleFunc
442450
'size'
@@ -468,6 +476,7 @@ Stroustrup00
468476
Stroustrup05
469477
Stroustrup13
470478
Stroustrup14
479+
Stroustrup94
471480
Stroustrup's
472481
struct
473482
suboperations

0 commit comments

Comments
 (0)