mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
CODINGSTYLE.md: fix sample for container iteration
The `for` loop in the sample iterates over `serviceUuids`, but the only other statement in the sample assigns variable named `l`. Fix the name of the variable in the assignment to be the same as in the loop. Signed-off-by: Andrei Rybak <rybak.a.v@gmail.com>
This commit is contained in:
parent
b59b18bfff
commit
e130add0c5
1 changed files with 1 additions and 1 deletions
|
@ -187,7 +187,7 @@ other editors that implement this coding style, please add them here.
|
||||||
- If the variable is a container that is only assigned to a local variable to
|
- If the variable is a container that is only assigned to a local variable to
|
||||||
be able to use it in a range-based for loop
|
be able to use it in a range-based for loop
|
||||||
```
|
```
|
||||||
const auto l = device.serviceUuids();
|
const auto serviceUuids = device.serviceUuids();
|
||||||
for (QBluetoothUuid id: serviceUuids) {
|
for (QBluetoothUuid id: serviceUuids) {
|
||||||
```
|
```
|
||||||
The variable has also to be const to avoid that Qt containers will do a
|
The variable has also to be const to avoid that Qt containers will do a
|
||||||
|
|
Loading…
Reference in a new issue