clang-tidy: Enable readability-qualified-auto check
This check aims to improve code readability by suggesting the use
of const auto * instead of auto for variables that are pointers
or iterators. This helps clarify the const-ness of the pointed-to
object or container elements.
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: Ia132b6dd8ae4e3c16809326f6055396666abc95a
diff --git a/test/utest-led-yaml-led-priority.cpp b/test/utest-led-yaml-led-priority.cpp
index 4cee0f0..a432547 100644
--- a/test/utest-led-yaml-led-priority.cpp
+++ b/test/utest-led-yaml-led-priority.cpp
@@ -29,7 +29,7 @@
EXPECT_EQ(group.priority, 0);
EXPECT_EQ(group.actionSet.size(), 1);
- for (auto& led : group.actionSet)
+ for (const auto& led : group.actionSet)
{
EXPECT_EQ(led.name, "led1");
EXPECT_EQ(led.action, Action::On);
@@ -47,7 +47,7 @@
EXPECT_EQ(group.priority, 0);
EXPECT_EQ(group.actionSet.size(), 1);
- for (auto& led : group.actionSet)
+ for (const auto& led : group.actionSet)
{
EXPECT_EQ(led.name, "led2");
EXPECT_EQ(led.action, Action::Off);
@@ -65,7 +65,7 @@
EXPECT_EQ(group.priority, 0);
EXPECT_EQ(group.actionSet.size(), 1);
- for (auto& led : group.actionSet)
+ for (const auto& led : group.actionSet)
{
EXPECT_EQ(led.name, "led3");
EXPECT_EQ(led.action, Action::Blink);