Skip to content

Commit 254b0aa

Browse files
authored
Fix typos and add example to yoda-conditions.
1 parent 482acda commit 254b0aa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

develop/style-guide.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,9 @@ redirect_from:
348348
<BAD_CODE_SNIPPET>
349349
if (1 == x) {
350350
</BAD_CODE_SNIPPET>
351+
<CODE_SNIPPET>
352+
if (x == 1) { //use this order
353+
</CODE_SNIPPET>
351354
<BAD_CODE_SNIPPET>
352355
if ((x = f()) &amp;&amp; (y = g())) {
353356
</BAD_CODE_SNIPPET>
@@ -785,7 +788,7 @@ redirect_from:
785788
Every file should have a comment at the top describing its contents.
786789
</p>
787790
<p>
788-
Generally a <code>.h</code> file will describe the variabels and
791+
Generally a <code>.h</code> file will describe the variables and
789792
functions
790793
that are declared in the file with an overview of what they
791794
are for and how they are used. A <code>.c</code> file
@@ -1666,7 +1669,7 @@ redirect_from:
16661669
the easier it is to follow and understand the control flow of
16671670
the program. Of course, readability can suffer from code
16681671
being too dense as well as too spread out, so use your
1669-
judgement. But in general, minimize use of vertical
1672+
judgment. But in general, minimize use of vertical
16701673
whitespace.
16711674
</p>
16721675
</BODY>

0 commit comments

Comments
 (0)