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:
Andrei Rybak 2023-03-26 18:23:17 +02:00 committed by bstoeger
parent b59b18bfff
commit e130add0c5

View file

@ -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
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) {
```
The variable has also to be const to avoid that Qt containers will do a