Mercurial > template
diff STYLE.md @ 52:02ec33e7ca7f default tip @
minor fixes
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 17 Dec 2020 10:33:19 +0100 |
parents | 884ef6321dcc |
children |
line wrap: on
line diff
--- a/STYLE.md Tue Jan 07 11:01:27 2020 +0100 +++ b/STYLE.md Thu Dec 17 10:33:19 2020 +0100 @@ -1,4 +1,4 @@ -PROJECT NAME CODING STYLE +PROJECT_NAME CODING STYLE ========================= File content @@ -204,8 +204,7 @@ ### Comments Avoid useless comments in source files. Comment complex things or why it is done -like this. However any public function in the .h **must** be documented as -doxygen without exception. +like this. Do not use `//` style comments in C. ```c /* @@ -213,7 +212,7 @@ * this. */ -// Short comment +/* Short comment. */ ``` Use `#if 0` to comment blocks of code. @@ -248,7 +247,7 @@ ### C Standard -Use C99 standard without extensions. +Use C11 standard without extensions. ### Assertions @@ -462,8 +461,7 @@ ### Comments Avoid useless comments in source files. Comment complex things or why it is done -like this. However any public function in the .hpp **must** be documented as -doxygen without exception. +like this. ```cpp /* @@ -615,9 +613,9 @@ ```cpp std::vector<int> v{1, 2, 3}; -foo({1, 2}); // type deduced +foo({1, 2}); // type deduced -return { "true", false }; // std::pair returned +return { "true", false }; // std::pair returned ``` Use the assignment for primitive types: @@ -982,7 +980,7 @@ ----------- You can use three backticks and the language specifier or just indent a block by -for leading spaces if you don't need syntax. +for leading tabs if you don't need syntax. ```cpp std::cout << "hello world" << std::endl;