From a89471c69e1488267bc478c2943128f429cdf9fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=8B=D1=87=D0=BA=D0=BE=D0=B2=20=D0=90=D0=BD=D0=B4?= =?UTF-8?q?=D1=80=D0=B5=D0=B9?= Date: Fri, 16 Jun 2023 18:00:36 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB(?= =?UTF-8?q?=D0=B0)=20=D0=BD=D0=B0=20'C/C++=20Coding=20Conventions'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- C%2FC%2B%2B-Coding-Conventions.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/C%2FC%2B%2B-Coding-Conventions.md b/C%2FC%2B%2B-Coding-Conventions.md index ae9cd08..9944d74 100644 --- a/C%2FC%2B%2B-Coding-Conventions.md +++ b/C%2FC%2B%2B-Coding-Conventions.md @@ -1,6 +1,9 @@ ### Вот некоторые соглашения которые сейчас используются и должны использоваться дальше в нашем коде: + **1. We use include guards instead of #pragma once** + **2. 3rd-party headers must be included using <>, and our files - using ""** + **3. Author information, like "Created by John Doe on xx.xx.xxxx", which is inserted automatically by many IDEs when creating a new file, is not allowed and must be removed** **4. General naming conventions examples:** @@ -24,7 +27,9 @@ | Boolean getters | canFoo, hasFoo, isFoo, ... | **5. For asynchronous functions use suffix "Async"**, e.g: `void loadAsync()` + **6. Avoid using `[&]` or `[=]` as lambda captions. It often causes problems with dangling references.** + **7. Put bodies of selection and iteration statements into compound blocks, even if the body is a one-liner** E.g.: ``` // Bad