From 247b93e8ec82eb8f5537513fee9d857728f4690f Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Sat, 20 Jan 2018 12:10:21 +0300 Subject: [PATCH] Require '#pragma once' in new code --- CODING_GUIDELINES.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/CODING_GUIDELINES.md b/CODING_GUIDELINES.md index 5f5cc6572..503d3d46e 100644 --- a/CODING_GUIDELINES.md +++ b/CODING_GUIDELINES.md @@ -240,7 +240,23 @@ Example: ``` -### 9. Misc. ### +### 9. Include guard. ### +`#pragma once` should be used instead of "include guard" in new code: +```c++ +// examplewidget.h + +#pragma once + +#include + +class ExampleWidget : public QWidget +{ + // (some code omitted) +}; + +``` + +### 10. Misc. ### * Line breaks for long lines with operation: