mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
Require '#pragma once' in new code
This commit is contained in:
parent
6470f9acb9
commit
247b93e8ec
@ -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:
|
* Line breaks for long lines with operation:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user