02.09.2009, в 8:40, David Levin написал(а):
Use enums instead of bools for parameters. The one exception is
function names that start with "set" and take one parameter (e.g.
setAllowHeaders).
The purpose of this rule is to avoid having illegible function calls
like doSomething(myData, true, 0, false, true). If a function is
always called with a named variable, there is no practical reason to
invent an enum for it.
Constants
Constants (static const int's) should be named just like a variable
and have no special prefix
As an aside, is there any practical difference between "static const"
and "const" in C++? The only difference I'm aware of is that the
former is deprecated in the standard.
Indentation
Additional clauses in a conditional may be indented 4 extra spaces
to visually separate them from the statement to be executed.
Like this
if (condition1
&& condition2)
statement;
It doesn't look like there's a prevailing style for this currently.
- WBR, Alexey Proskuryakov
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev