Browse Source

Merge pull request #8292 from glassez/coding-style

Require '#pragma once' in new code
adaptive-webui-19844
Vladimir Golovnev 7 years ago committed by GitHub
parent
commit
4386fd9f89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      CODING_GUIDELINES.md

18
CODING_GUIDELINES.md

@ -240,7 +240,23 @@ Example: @@ -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 <QWidget>
class ExampleWidget : public QWidget
{
// (some code omitted)
};
```
### 10. Misc. ###
* Line breaks for long lines with operation:

Loading…
Cancel
Save