diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-08-21 13:29:12 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-08-21 13:29:12 +0000 |
commit | 280050b7aef40a452f4202c0cca030d639c29cf4 (patch) | |
tree | 278ae8155cf7658f4f2dcff32412e3885d7b4961 /docs | |
parent | 4652980fbbf0103d07a5573e0a114c68f09d50c3 (diff) | |
download | ATCD-280050b7aef40a452f4202c0cca030d639c29cf4.tar.gz |
ChangeLogTag: Tue Aug 21 08:26:30 2001 David L. Levine <levine@cs.wustl.edu>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/ACE-guidelines.html | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/docs/ACE-guidelines.html b/docs/ACE-guidelines.html index 24ad9e0e743..8a08e8c96f9 100644 --- a/docs/ACE-guidelines.html +++ b/docs/ACE-guidelines.html @@ -340,8 +340,7 @@ The correct way to write that guard is: #include "Foo_T.h" #endif /* FOO_H */ -</pre></p> - </li> +</pre></p></li> <li>Avoid <code>#include <math.h></code> if at all possible. The <code>/usr/include/math.h</code> on SunOS 5.5.1 through 5.7 @@ -378,17 +377,17 @@ The correct way to write that guard is: <ul> <li><strong><code>for</code></strong> loops should look like: <pre> - for (size_t i = 0; i < Options::instance ()->spawn_count (); ++i) - spawn (); + for (u_int i = 0; i < count; ++i) + ++total; </pre> Though, I prefer to always wrap the body of the loop in braces, to avoid surprises when other code or debugging statements are added, and to maintain sanity when the body consists of a macro, such as an ACE_ASSERT without a trailing semicolon: <pre> - for (size_t i = 0; i < Options::instance ()->spawn_count (); ++i) + for (u_int i = 0; i < count; ++i) { - ACE_ASSERT (spawn_result == 0;) + ACE_ASSERT (++total < UINT_MAX;) } </pre><p> @@ -698,17 +697,15 @@ Foo::bar () template and non-template code is mixed in the same file.<p> <li>It's a good idea to specify the include path (with <code>-I</code>) - to include any directory which contains files with template - definitions. The <code>-ptv</code> Digital Unix cxx compiler option - may help diagnose missing template instantiation problems.<p> - </li> + to include any directory which contains files with template + definitions. The Compaq Tru64 cxx <code>-ptv</code> compiler option + may help diagnose missing template instantiation problems.<p> <li>When referring to member variables and functions, use - <code>this-></code><em>member</em>. This makes it clear to the - reader that a class member is being used. It also makes it crystal - clear to the compiler which variable/function you mean in cases - where it might make a difference. - </li> + <code>this-></code><em>member</em>. This makes it clear to the + reader that a class member is being used. It also makes it crystal + clear to the compiler which variable/function you mean in cases + where it might make a difference. </ul> <li><strong>I/O</strong><p> |