From e130add0c52328d22cf994984debf9dc76174fed Mon Sep 17 00:00:00 2001 From: Andrei Rybak Date: Sun, 26 Mar 2023 18:23:17 +0200 Subject: [PATCH] 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 --- CODINGSTYLE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODINGSTYLE.md b/CODINGSTYLE.md index b8233d091..f10809af2 100644 --- a/CODINGSTYLE.md +++ b/CODINGSTYLE.md @@ -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