mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 09:21:57 -05:00
Documentation: Don't use std:: in examples
We don't use `std::swap()`, so don't mention it in documentation :^)
This commit is contained in:
parent
fcb45f4893
commit
eaec863b94
1 changed files with 5 additions and 6 deletions
|
@ -339,8 +339,7 @@ In C++ implementation files, do not use "using" declarations of any kind to impo
|
|||
```cpp
|
||||
// File.cpp
|
||||
|
||||
std::swap(a, b);
|
||||
c = std::numeric_limits<int>::max()
|
||||
Core::ArgsParser args_parser;
|
||||
```
|
||||
|
||||
###### Wrong:
|
||||
|
@ -348,8 +347,8 @@ c = std::numeric_limits<int>::max()
|
|||
```cpp
|
||||
// File.cpp
|
||||
|
||||
using std::swap;
|
||||
swap(a, b);
|
||||
using Core::ArgsParser;
|
||||
ArgsParser args_parser;
|
||||
```
|
||||
|
||||
###### Wrong:
|
||||
|
@ -357,8 +356,8 @@ swap(a, b);
|
|||
```cpp
|
||||
// File.cpp
|
||||
|
||||
using namespace std;
|
||||
swap(a, b);
|
||||
using namespace Core;
|
||||
ArgsParser args_parser;
|
||||
```
|
||||
|
||||
### Types
|
||||
|
|
Loading…
Reference in a new issue