aboutsummaryrefslogtreecommitdiffstats
path: root/CODINGSTYLE.md
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-02-03 19:12:50 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-02-04 02:17:52 +0100
commit65df9ca7b089adf649dae4379c5e14fc3489650e (patch)
treeed8f563051dcd3db1f022100380d28d6db98df67 /CODINGSTYLE.md
parentd27b6805f3ff4787acc24f8b652e3b13f8860d78 (diff)
downloadsubsurface-65df9ca7b089adf649dae4379c5e14fc3489650e.tar.gz
Coding style: PascalCase for classes
Codify our unspoken practice in the coding style document. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'CODINGSTYLE.md')
-rw-r--r--CODINGSTYLE.md15
1 files changed, 10 insertions, 5 deletions
diff --git a/CODINGSTYLE.md b/CODINGSTYLE.md
index 15cde9435..c6b6e2593 100644
--- a/CODINGSTYLE.md
+++ b/CODINGSTYLE.md
@@ -87,16 +87,21 @@ other editors that implement this coding style, please add them here.
* unfortunate inconsistency
- C code usually uses underscores to structure names
- ```
+ ```
variable_in_C
- ```
+ ```
- In contrast, C++ code usually uses camelCase
- ```
+ ```
variableInCPlusPlus
- ```
+ ```
+ for variable names and PascalCase
+ ```
+ ClassInCPlusPlus
+ ```
+ for names of classes and other types
where the two meet, use your best judgment and go for best consistency
- (i.e., where does the variable "originate")
+ (i.e., where does the name "originate")
* there is a strong preference for lower case file names; sometimes conventions
or outside requirements make camelCase filenames the better (or only) choice,