Bug 550468 - Fix support for Pango font engine on Qt platform; (Bv1) Make MOZ_PANGO...
[mozilla-central.git] / storage / style.txt
blob320355690d96bc0363f2ff0b5c5fe868f20ad57d
1 Storage Module Style Guidelines
3 These guidelines should be followed for all new code in this module.  Reviewers
4 will be enforcing them, so please obey them!
6 * All code should be contained within the namespace mozilla::storage at a
7   minimum.  The use of namespaces is strongly encouraged.
9 * All functions being called in the global namespace should be prefixed with
10   "::" to indicate that they are in the global namespace.
12 * The indentation level to use in source code is two spaces.  No tabs, please!
14 * All files should have the following emacs and vim mode lines:
15   -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
16   vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
18 * All functions that are not XPCOM should start with a lowercase letter.
20 * Function arguments that are not out parameters should be prefixed with a (for
21   pArameter), and use CamelCase.
23 * Function arguments that are out parameters should be prefixed with an
24   underscore and have a descriptive name.
26 * Function declarations should include javadoc style comments.
28 * For function implementations, each argument should be on its own line.
30 * All variables should use camelCase.
32 * The use of bool is encouraged whenever the variable does not have the
33   potential to go through xpconnect.
35 * For pointer variable types, include a space after the type before the asterisk
36   and no space between the asterisk and variable name.
38 * If any part of an if-else block requires braces, all blocks need braces.
40 * Every else should be on a newline after a brace.
42 * Bracing should start on the line after a function and class definition.
44 * If a return value is not going to be checked, the return value should be
45   explicitly casted to void (C style cast).