clang-tidy: Improve const-correctness
Updated member functions to better reflect const-correctness,
enhancing code clarity and maintainability.
Change-Id: Ib3fdbd2164cb76ad7f0c454d37dd5c08652f78fc
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
diff --git a/tests/src/test_trigger_actions.cpp b/tests/src/test_trigger_actions.cpp
index 8e8274f..e1a2a1c 100644
--- a/tests/src/test_trigger_actions.cpp
+++ b/tests/src/test_trigger_actions.cpp
@@ -150,7 +150,7 @@
commitValue = value;
}
- void commit()
+ void commit() const
{
std::string thresholdName = "MyThreshold";
sut->commit("MyTrigger", std::cref(thresholdName), "MySensor",
@@ -188,7 +188,7 @@
sut = std::make_unique<LogToRedfishEventLog>();
}
- void commit(TriggerValue value)
+ void commit(TriggerValue value) const
{
std::string thresholdName = "MyThreshold";
sut->commit("MyTrigger", std::cref(thresholdName), "MySensor",
@@ -276,7 +276,7 @@
std::make_shared<std::vector<std::string>>(std::move(names)));
}
- void commit(TriggerValue value)
+ void commit(TriggerValue value) const
{
sut->commit(triggerId, std::nullopt, "MySensor", Milliseconds{100'000},
value);