1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-30 03:34:20 +03:00

coding-style.asciidoc: Update to C++14 and add a few more guidelines

This commit is contained in:
Maxime Coste 2018-04-03 09:45:08 +10:00
parent ff073bcce1
commit 895ec93b5c

View File

@ -1,7 +1,7 @@
C++ Coding Style C++ Coding Style
================ ================
Kakoune is written in C++11, here are the main coding style points: Kakoune is written in C++14, here are the main coding style points:
* Avoid external dependencies besides posix/stdc++/ncurses * Avoid external dependencies besides posix/stdc++/ncurses
@ -14,6 +14,8 @@ Kakoune is written in C++11, here are the main coding style points:
* opening brackets on their own lines by default, except when declaring * opening brackets on their own lines by default, except when declaring
an object where the opening bracket follows the equal sign. an object where the opening bracket follows the equal sign.
* use alternative logical operator names (and, or, not instead of &&, ||, !)
----- -----
int func() int func()
{ {
@ -33,7 +35,7 @@ int array[] = {
* End lines with an operator when continuing on the next line * End lines with an operator when continuing on the next line
---- ----
if (condition1 || if (condition1 or
condition2) condition2)
---- ----