mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-29 13:58:51 +03:00
Merge pull request #8292 from glassez/coding-style
Require '#pragma once' in new code
This commit is contained in:
commit
4386fd9f89
1 changed files with 17 additions and 1 deletions
|
@ -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…
Reference in a new issue