fixed clang-tidy errors
fixed clang compilation error and few clang-tidy issues
Tested:
- Code compiles, all unit tests are passing
- Number of reported clang-tidy issues decreased
Change-Id: Ie3f88db6e2dffb26ec6c56dbdc1ce5bad288dccd
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
diff --git a/src/trigger_factory.cpp b/src/trigger_factory.cpp
index 0003360..493fe32 100644
--- a/src/trigger_factory.cpp
+++ b/src/trigger_factory.cpp
@@ -33,7 +33,7 @@
std::vector<TriggerAction> triggerActions;
std::transform(triggerActionsIn.begin(), triggerActionsIn.end(),
std::back_inserter(triggerActions),
- [](auto& triggerActionStr) {
+ [](const auto& triggerActionStr) {
return toTriggerAction(triggerActionStr);
});
std::vector<std::shared_ptr<interfaces::Threshold>> thresholds;
@@ -144,7 +144,7 @@
const auto& [sensorPath, metadata] = item;
auto found = std::find_if(
tree.begin(), tree.end(),
- [&sensorPath](const auto& x) { return x.first == sensorPath; });
+ [path = sensorPath](const auto& x) { return x.first == path; });
if (tree.end() != found)
{