mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-06 05:01:25 -07:00
Require '#pragma once' in new code
This commit is contained in:
parent
c9c7a5be53
commit
726790fa93
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…
Add table
Add a link
Reference in a new issue