Skip to content

Commit 6501b9c

Browse files
authored
Fix a few spelling and grammar issues in C++ style guide (#313)
1 parent 7e0be68 commit 6501b9c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

cppguide.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h2 class="ignoreLink" id="Background">
3232
</p>
3333
<p>
3434
There are two main overarching purposes to this guide. The first is
35-
to act as a normal C++ style guide (both in terms fo formatting and
35+
to act as a normal C++ style guide (both in terms of formatting and
3636
programming practices) for C++ developers of WPILib. The other
3737
purpose is to help Java programmers who may know a moderate amount of
3838
C++ but may not be fully up to date with things like C++11 and so may
@@ -43,33 +43,33 @@ <h2 class="ignoreLink" id="Background">
4343
"http://google-styleguide.googlecode.com/svn/trunk/cppguide.html">Google
4444
C++ Style Guide</a>. The Google Style Guide has a lot of good points
4545
and is a good read, but in order to cut the style guide down to a
46-
more readable size and to focus mroe on WPILib-specific information,
47-
we have altetered the original style guide in several ways.
46+
more readable size and to focus more on WPILib-specific information,
47+
we have altered the original style guide in several ways.
4848
</p>
4949
<p>
5050
One way in which we <em>haven't</em> done much to alter the original
5151
style guide is to keep the vast majority of the
5252
formatting/naming/etc. related information intact. This is both so
5353
that we do not have to write up our own standards and so that
54-
existing tools such as clang-format and the Google eclipse format
54+
existing tools such as clang-format and the Google Eclipse format
5555
configuration files can work out of the box. All of these things
5656
should be relatively non-controversial and do not require much
5757
discussion.
5858
</p>
5959
<p>
6060
Where we deviate more from the original guide is in the style of the
61-
code itself. At the moment (ie, when we first created this modified
61+
code itself. At the moment (i.e., when we first created this modified
6262
version), we deleted all of the sections of the original guide which
6363
mandate particular programming practices such as forbidding
6464
exceptions, multiple inheritance, etc. However, as time goes on, we
65-
gradually add in more information along this lines, either by copying
65+
gradually add in more information along those lines, either by copying
6666
directly from Google's Style Guide or by writing our own decisions
6767
and best practices, some of which may be very WPILib-specific.
6868
</p>
6969
<p>
7070
As the original guide makes very clear, consistency is extremely
7171
important to keeping the code base manageable, and so we encourage
72-
that, wherever reasonable, that you keep everything consistent with
72+
that, wherever reasonable, you keep everything consistent with
7373
whatever the standard style is.
7474
</p>
7575
<p>
@@ -78,10 +78,10 @@ <h2 class="ignoreLink" id="Background">
7878
consistent and easier for users, we ask that, in general, Java and
7979
C++ be kept as consistent with one another as reasonable. This
8080
includes everything from using two spaces for indentation in both
81-
language to keeping the inheritance structure essentially the same in
81+
languages to keeping the inheritance structure essentially the same in
8282
both. Although the two do not have to be precisely the same, it does
8383
mean that if there is something that you are doing which will be
84-
imposssible to reproduce in some way in Java, then you may want to
84+
impossible to reproduce in some way in Java, then you may want to
8585
reconsider.
8686
</p>
8787
<p>
@@ -129,13 +129,13 @@ <h3 id="Pointers">
129129
</p>
130130
<ul>
131131
<li>
132-
<code>std::unique_ptr</code> Should be used when you still need to
132+
<code>std::unique_ptr</code> should be used when you still need to
133133
use a pointer, but you only need one entity to own the pointer. The
134134
<code>std::unique_ptr</code> will automatically be deleted when
135135
there are no more references to it.
136136
</li>
137137
<li>
138-
<code>std::shared_ptr</code> Should be used when you still need to
138+
<code>std::shared_ptr</code> should be used when you still need to
139139
use a pointer and you need many references to the object. When
140140
there are zero remaining references to the object, it will be
141141
deleted. Use <code>std::weak_ptr</code> where necessary to avoid
@@ -1299,7 +1299,7 @@ <h4 class="stylepoint_subsection">
12991299
<p>
13001300
Note that you should <em>never</em> describe the code itself.
13011301
Assume that the person reading the code knows C++ better than you
1302-
do, even though he or she does not know what you are trying to do:
1302+
do, even though they do not know what you are trying to do:
13031303
</p>
13041304
<pre class="badcode">
13051305
// Now go through the b array and make sure that if i occurs,

0 commit comments

Comments
 (0)