There was an error while loading. Please reload this page.
We base our style and best practice guidelines on the ones at geosoft.no with a few modifications.
11. Don't use the underscore _ suffix for private members.
_
24. We use the Id suffix instead of the No suffix.
Id
No
34. We use the file extensions .cpp and .hpp.
.cpp
.hpp
36. In some cases it might be permitted to define methods in the header files (e.g. when templating)
58. break and continue are permitted.
break
continue
70. Use nullptr for Null-Pointers instead of 0 or NULL
nullptr
0
NULL
75. For the else block, either put opening and closing bracket on the same line or both on separate lines:
else
// DO: if ( ) { // do something } else { // do something else } // DO: if ( ) { // do something } else { // do something else } // DON'T: (don't mix it up) if ( ) { // do something } else { // do something else }
81. Same thing as in 75. (see above)
83. Don't put the function return type on a separate line.
85. Don't put a space between the function name and the first (. DO: foo(bar), NOT: foo (bar).
(
foo(bar)
foo (bar)
90. - 94. We use Doxygen style comments.